stylo: Remove some unused imports and code

This commit is contained in:
Emilio Cobos Álvarez 2016-07-07 20:23:35 -07:00
parent 3037a59252
commit 73ba2c5984
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 0 additions and 9 deletions

View file

@ -13,7 +13,6 @@ dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"style_traits 0.0.1", "style_traits 0.0.1",

View file

@ -38,7 +38,6 @@ libc = "0.2"
log = {version = "0.3.5", features = ["release_max_level_info"]} log = {version = "0.3.5", features = ["release_max_level_info"]}
num_cpus = "0.2.2" num_cpus = "0.2.2"
selectors = "0.7" selectors = "0.7"
smallvec = "0.1"
string_cache = {version = "0.2.20", features = ["unstable"]} string_cache = {version = "0.2.20", features = ["unstable"]}
style = {path = "../../components/style", features = ["gecko"]} style = {path = "../../components/style", features = ["gecko"]}
style_traits = {path = "../../components/style_traits"} style_traits = {path = "../../components/style_traits"}

View file

@ -16,7 +16,6 @@ extern crate libc;
extern crate log; extern crate log;
extern crate num_cpus; extern crate num_cpus;
extern crate selectors; extern crate selectors;
extern crate smallvec;
#[macro_use(atom, ns)] #[macro_use(atom, ns)]
extern crate string_cache; extern crate string_cache;
extern crate style; extern crate style;

View file

@ -31,12 +31,10 @@ use selector_impl::{GeckoSelectorImpl, NonTSPseudoClass, PrivateStyleData};
use selectors::Element; use selectors::Element;
use selectors::matching::DeclarationBlock; use selectors::matching::DeclarationBlock;
use selectors::parser::{AttrSelector, NamespaceConstraint}; use selectors::parser::{AttrSelector, NamespaceConstraint};
use smallvec::VecLike;
use std::marker::PhantomData; use std::marker::PhantomData;
use std::ops::BitOr; use std::ops::BitOr;
use std::ptr; use std::ptr;
use std::slice; use std::slice;
use std::str::from_utf8_unchecked;
use std::sync::Arc; use std::sync::Arc;
use string_cache::{Atom, BorrowedAtom, BorrowedNamespace, Namespace}; use string_cache::{Atom, BorrowedAtom, BorrowedNamespace, Namespace};
use style::dom::{OpaqueNode, PresentationalHintsSynthetizer}; use style::dom::{OpaqueNode, PresentationalHintsSynthetizer};
@ -641,7 +639,3 @@ impl<'le> ElementExt for GeckoElement<'le> {
self.match_non_ts_pseudo_class(NonTSPseudoClass::AnyLink) self.match_non_ts_pseudo_class(NonTSPseudoClass::AnyLink)
} }
} }
unsafe fn reinterpret_string<'a>(ptr: *const ::libc::c_char, length: u32) -> Option<&'a str> {
(ptr as *const u8).as_ref().map(|p| from_utf8_unchecked(slice::from_raw_parts(p, length as usize)))
}