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

@ -70,8 +70,10 @@ git = "https://github.com/tomaka/clock_ticks"
[dependencies]
log = "*"
encoding = "0.2"
fnv = "1.0"
url = "0.2.35"
bitflags = "*"
rustc-serialize = "0.3"
libc = "*"
cssparser = "0.3.1"
smallvec = "0.1"

View file

@ -10,6 +10,7 @@ use css::matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache};
use canvas_traits::CanvasMsg;
use msg::compositor_msg::LayerId;
use fnv::FnvHasher;
use geom::{Rect, Size2D};
use gfx::display_list::OpaqueNode;
use gfx::font_cache_task::FontCacheTask;
@ -27,7 +28,6 @@ use std::sync::{Arc, Mutex};
use std::sync::mpsc::{channel, Sender};
use style::selector_matching::Stylist;
use url::Url;
use util::fnv::FnvHasher;
use util::geometry::Au;
use util::opts;

View file

@ -12,6 +12,7 @@ use css::node_style::StyledNode;
use data::{LayoutDataAccess, LayoutDataWrapper};
use incremental::{self, RestyleDamage};
use opaque_node::OpaqueNodeMethods;
use smallvec::SmallVec16;
use wrapper::{LayoutElement, LayoutNode, TLayoutNode};
use script::dom::characterdata::CharacterDataTypeId;
@ -34,7 +35,6 @@ use style::selector_matching::{Stylist, DeclarationBlock};
use util::arc_ptr_eq;
use util::cache::{LRUCache, SimpleHashCache};
use util::opts;
use util::smallvec::SmallVec16;
use util::vec::ForgetfulSink;
pub struct ApplicableDeclarations {

View file

@ -13,6 +13,7 @@ use flow::{self, AFFECTS_COUNTERS, Flow, HAS_COUNTER_AFFECTING_CHILDREN, Immutab
use flow::{InorderFlowTraversal};
use fragment::{Fragment, GeneratedContentInfo, SpecificFragmentInfo, UnscannedTextFragmentInfo};
use incremental::{self, RESOLVE_GENERATED_CONTENT};
use smallvec::SmallVec8;
use text::TextRunScanner;
use gfx::display_list::OpaqueNode;
@ -21,7 +22,6 @@ use std::sync::Arc;
use style::computed_values::content::ContentItem;
use style::computed_values::{display, list_style_type};
use style::properties::ComputedValues;
use util::smallvec::SmallVec8;
// Decimal styles per CSS-COUNTER-STYLES § 6.1:
static DECIMAL: [char; 10] = [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' ];
@ -556,4 +556,3 @@ fn push_numeric_representation(mut value: i32, system: &[char], accumulator: &mu
// Step 3.
accumulator.extend(string.iter().cloned().rev())
}

View file

@ -27,6 +27,7 @@ use azure::azure::AzColor;
use canvas_traits::CanvasMsg;
use encoding::EncodingRef;
use encoding::all::UTF_8;
use fnv::FnvHasher;
use geom::matrix;
use geom::point::Point2D;
use geom::rect::Rect;
@ -72,7 +73,6 @@ use style::selector_matching::Stylist;
use style::stylesheets::{Origin, Stylesheet, CSSRuleIteratorExt};
use url::Url;
use util::cursor::Cursor;
use util::fnv::FnvHasher;
use util::geometry::{Au, MAX_RECT};
use util::logical_geometry::LogicalPoint;
use util::mem::HeapSizeOf;

View file

@ -41,6 +41,7 @@ extern crate canvas_traits;
extern crate clock_ticks;
extern crate cssparser;
extern crate encoding;
extern crate fnv;
extern crate geom;
extern crate gfx;
extern crate gfx_traits;
@ -51,6 +52,7 @@ extern crate png;
extern crate script;
extern crate script_traits;
extern crate selectors;
extern crate smallvec;
extern crate string_cache;
extern crate style;
extern crate url;

View file

@ -60,6 +60,7 @@ use script::dom::node::{LayoutNodeHelpers, RawLayoutNodeHelpers, SharedLayoutDat
use script::dom::node::{HAS_CHANGED, IS_DIRTY, HAS_DIRTY_SIBLINGS, HAS_DIRTY_DESCENDANTS};
use script::dom::text::Text;
use script::layout_interface::LayoutChan;
use smallvec::VecLike;
use msg::constellation_msg::{PipelineId, SubpageId};
use util::str::is_whitespace;
use std::borrow::ToOwned;
@ -75,7 +76,6 @@ use selectors::parser::{NamespaceConstraint, AttrSelector};
use style::legacy::UnsignedIntegerAttribute;
use style::node::{TElement, TElementAttributes, TNode};
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock};
use util::smallvec::VecLike;
use url::Url;
/// Allows some convenience methods on generic layout nodes.