mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
now using external ref_slice instead of the std version
This commit is contained in:
parent
a8cbc28643
commit
1a8db9a07a
7 changed files with 24 additions and 4 deletions
|
@ -88,3 +88,4 @@ serde = "0.6"
|
||||||
caseless = "0.1.0"
|
caseless = "0.1.0"
|
||||||
image = "0.5.0"
|
image = "0.5.0"
|
||||||
url = "0.5"
|
url = "0.5"
|
||||||
|
ref_slice = "0.1.0"
|
||||||
|
|
|
@ -51,6 +51,7 @@ use js::jsapi::{JSContext, JSObject, JSRuntime};
|
||||||
use layout_interface::{LayoutChan, Msg};
|
use layout_interface::{LayoutChan, Msg};
|
||||||
use libc::{self, c_void, uintptr_t};
|
use libc::{self, c_void, uintptr_t};
|
||||||
use parse::html::parse_html_fragment;
|
use parse::html::parse_html_fragment;
|
||||||
|
use ref_slice::ref_slice;
|
||||||
use script_traits::UntrustedNodeAddress;
|
use script_traits::UntrustedNodeAddress;
|
||||||
use selectors::matching::matches;
|
use selectors::matching::matches;
|
||||||
use selectors::parser::Selector;
|
use selectors::parser::Selector;
|
||||||
|
@ -61,7 +62,6 @@ use std::cmp::max;
|
||||||
use std::default::Default;
|
use std::default::Default;
|
||||||
use std::iter::{self, FilterMap, Peekable};
|
use std::iter::{self, FilterMap, Peekable};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::slice::ref_slice;
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use string_cache::{Atom, Namespace, QualName};
|
use string_cache::{Atom, Namespace, QualName};
|
||||||
use style::properties::ComputedValues;
|
use style::properties::ComputedValues;
|
||||||
|
|
|
@ -27,12 +27,13 @@ use js::jsapi::{JS_GetArrayBufferData, JS_NewArrayBuffer};
|
||||||
use js::jsval::UndefinedValue;
|
use js::jsval::UndefinedValue;
|
||||||
use libc::{uint32_t, uint8_t};
|
use libc::{uint32_t, uint8_t};
|
||||||
use net_traits::hosts::replace_hosts;
|
use net_traits::hosts::replace_hosts;
|
||||||
|
use ref_slice::ref_slice;
|
||||||
use script_task::ScriptTaskEventCategory::WebSocketEvent;
|
use script_task::ScriptTaskEventCategory::WebSocketEvent;
|
||||||
use script_task::{CommonScriptMsg, Runnable};
|
use script_task::{CommonScriptMsg, Runnable};
|
||||||
use std::borrow::ToOwned;
|
use std::borrow::ToOwned;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
|
use std::ptr;
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use std::{ptr, slice};
|
|
||||||
use util::str::DOMString;
|
use util::str::DOMString;
|
||||||
use util::task::spawn_named;
|
use util::task::spawn_named;
|
||||||
use websocket::client::receiver::Receiver;
|
use websocket::client::receiver::Receiver;
|
||||||
|
@ -212,7 +213,7 @@ impl WebSocket {
|
||||||
// Step 4.
|
// Step 4.
|
||||||
let protocols: &[DOMString] = protocols
|
let protocols: &[DOMString] = protocols
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map_or(&[], |ref string| slice::ref_slice(string));
|
.map_or(&[], |ref string| ref_slice(string));
|
||||||
|
|
||||||
// Step 5.
|
// Step 5.
|
||||||
for (i, protocol) in protocols.iter().enumerate() {
|
for (i, protocol) in protocols.iter().enumerate() {
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#![feature(nonzero)]
|
#![feature(nonzero)]
|
||||||
#![feature(on_unimplemented)]
|
#![feature(on_unimplemented)]
|
||||||
#![feature(plugin)]
|
#![feature(plugin)]
|
||||||
#![feature(ref_slice)]
|
|
||||||
#![feature(slice_patterns)]
|
#![feature(slice_patterns)]
|
||||||
#![feature(str_utf16)]
|
#![feature(str_utf16)]
|
||||||
#![feature(unicode)]
|
#![feature(unicode)]
|
||||||
|
@ -61,6 +60,7 @@ extern crate offscreen_gl_context;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate profile_traits;
|
extern crate profile_traits;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
|
extern crate ref_slice;
|
||||||
extern crate rustc_serialize;
|
extern crate rustc_serialize;
|
||||||
extern crate rustc_unicode;
|
extern crate rustc_unicode;
|
||||||
extern crate script_traits;
|
extern crate script_traits;
|
||||||
|
|
6
components/servo/Cargo.lock
generated
6
components/servo/Cargo.lock
generated
|
@ -1533,6 +1533,11 @@ name = "rc"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ref_slice"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "regex"
|
||||||
version = "0.1.41"
|
version = "0.1.41"
|
||||||
|
@ -1582,6 +1587,7 @@ dependencies = [
|
||||||
"plugins 0.0.1",
|
"plugins 0.0.1",
|
||||||
"profile_traits 0.0.1",
|
"profile_traits 0.0.1",
|
||||||
"rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"ref_slice 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
"selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
6
ports/cef/Cargo.lock
generated
6
ports/cef/Cargo.lock
generated
|
@ -1447,6 +1447,11 @@ name = "rc"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ref_slice"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "regex"
|
||||||
version = "0.1.41"
|
version = "0.1.41"
|
||||||
|
@ -1496,6 +1501,7 @@ dependencies = [
|
||||||
"plugins 0.0.1",
|
"plugins 0.0.1",
|
||||||
"profile_traits 0.0.1",
|
"profile_traits 0.0.1",
|
||||||
"rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"ref_slice 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
"selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
6
ports/gonk/Cargo.lock
generated
6
ports/gonk/Cargo.lock
generated
|
@ -1427,6 +1427,11 @@ name = "rc"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ref_slice"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "regex"
|
||||||
version = "0.1.41"
|
version = "0.1.41"
|
||||||
|
@ -1476,6 +1481,7 @@ dependencies = [
|
||||||
"plugins 0.0.1",
|
"plugins 0.0.1",
|
||||||
"profile_traits 0.0.1",
|
"profile_traits 0.0.1",
|
||||||
"rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"ref_slice 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
"selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue