Remove fnv & smallvec crate reexports from util

The util component specified fnv and smallvec as dependencies and publicly
reexported both of them. Several other components utilized these reexports,
presumably because fnv and smallvec used to live in the tree so reexporting
made the transition easier.

These indirect dependencies through the util component are unnecessary.

This commit removes the fnv & smallvec crate reexports in the util component.
It exchange, it adds fnv & smallvec as dependencies to non-util components
wherever needed. Finally, it removes the fnv dependency from util as it is not
utilized anywhere in the util component.
This commit is contained in:
Corey Farwell 2015-06-09 22:41:43 -07:00
parent 44a4b7886d
commit 4f47b41fa7
29 changed files with 58 additions and 30 deletions

View file

@ -30,6 +30,7 @@ git = "https://github.com/servo/string-cache"
[dependencies]
log = "*"
encoding = "0.2"
fnv = "1.0"
rustc-serialize = "0.3"
matches = "0.1"
url = "0.2.35"
@ -37,3 +38,4 @@ bitflags = "*"
cssparser = "0.3.1"
num = "0.1.24"
lazy_static = "0.1.10"
smallvec = "0.1"

View file

@ -12,8 +12,8 @@ use selectors::matching::DeclarationBlock;
use node::TElementAttributes;
use properties::PropertyDeclaration;
use selector_matching::Stylist;
use smallvec::VecLike;
use util::smallvec::VecLike;
/// Legacy presentational attributes that take a nonnegative integer as defined in HTML5 § 2.4.4.2.
#[derive(Copy, Clone, PartialEq, Eq)]

View file

@ -15,7 +15,9 @@
#[macro_use] extern crate log;
#[macro_use] extern crate bitflags;
extern crate fnv;
extern crate geom;
extern crate smallvec;
extern crate url;
#[macro_use]

View file

@ -7,7 +7,7 @@
use legacy::UnsignedIntegerAttribute;
use properties::PropertyDeclaration;
use util::smallvec::VecLike;
use smallvec::VecLike;
use selectors::matching::DeclarationBlock;
pub use selectors::tree::{TNode, TElement};

View file

@ -12,12 +12,12 @@ use std::fmt::Debug;
use std::hash::{Hash, Hasher};
use std::sync::Arc;
use util::fnv::FnvHasher;
use util::logical_geometry::{LogicalMargin, PhysicalSide, WritingMode};
use util::geometry::Au;
use url::Url;
use cssparser::{Parser, Color, RGBA, AtRuleParser, DeclarationParser,
DeclarationListParser, parse_important, ToCss};
use fnv::FnvHasher;
use geom::SideOffsets2D;
use geom::size::Size2D;
@ -5932,4 +5932,3 @@ fn compute_font_hash(font: &mut style_structs::Font) {
font.font_family.hash(&mut hasher);
font.hash = hasher.finish()
}

View file

@ -10,8 +10,8 @@ use selectors::matching::DeclarationBlock as GenericDeclarationBlock;
use selectors::parser::PseudoElement;
use selectors::tree::TNode;
use std::process;
use smallvec::VecLike;
use util::resource_files::read_resource_file;
use util::smallvec::VecLike;
use legacy::PresentationalHintSynthesis;
use media_queries::Device;

View file

@ -18,7 +18,7 @@ use parser::{ParserContext, log_css_error};
use properties::{PropertyDeclarationBlock, parse_property_declaration_list};
use media_queries::{Device, MediaQueryList, parse_media_query_list};
use font_face::{FontFaceRule, parse_font_face_block};
use util::smallvec::SmallVec2;
use smallvec::SmallVec2;
use viewport::ViewportRule;