style: Update smallvec to 1.0.

Differential Revision: https://phabricator.services.mozilla.com/D56044
This commit is contained in:
Emilio Cobos Álvarez 2019-12-15 21:22:24 +01:00
parent 789ddd9dc1
commit ad61cae6b0
12 changed files with 21 additions and 21 deletions

View file

@ -10,7 +10,7 @@ name = "fallible"
path = "lib.rs"
[dependencies]
smallvec = "0.6"
smallvec = "1.0"
hashglobe = { path = "../hashglobe" }
# This crate effectively does nothing except if the `known_system_malloc`

View file

@ -39,7 +39,7 @@ serde = { version = "1.0.27", optional = true }
serde_bytes = { version = "0.11", optional = true }
servo_arc = { path = "../servo_arc" }
smallbitvec = "2.3.0"
smallvec = "0.6"
smallvec = "1.0"
string_cache = { version = "0.8", optional = true }
thin-slice = "0.1.0"
time = { version = "0.1.17", optional = true }

View file

@ -29,7 +29,7 @@ fxhash = "0.2"
phf = "0.8"
precomputed-hash = "0.1"
servo_arc = { version = "0.1", path = "../servo_arc" }
smallvec = "0.6"
smallvec = "1.0"
thin-slice = "0.1.0"
to_shmem = { path = "../to_shmem" }
to_shmem_derive = { path = "../to_shmem_derive" }

View file

@ -142,7 +142,7 @@ impl<Impl: SelectorImpl> SelectorBuilder<Impl> {
let iter = SelectorBuilderIter {
current_simple_selectors: current.iter(),
rest_of_simple_selectors: rest,
combinators: self.combinators.drain().rev(),
combinators: self.combinators.drain(..).rev(),
};
Arc::into_thin(Arc::from_header_and_iter(header, iter))
@ -152,7 +152,7 @@ impl<Impl: SelectorImpl> SelectorBuilder<Impl> {
struct SelectorBuilderIter<'a, Impl: SelectorImpl> {
current_simple_selectors: slice::Iter<'a, Component<Impl>>,
rest_of_simple_selectors: &'a [Component<Impl>],
combinators: iter::Rev<smallvec::Drain<'a, (Combinator, usize)>>,
combinators: iter::Rev<smallvec::Drain<'a, [(Combinator, usize); 16]>>,
}
impl<'a, Impl: SelectorImpl> ExactSizeIterator for SelectorBuilderIter<'a, Impl> {

View file

@ -66,7 +66,7 @@ servo_arc = { path = "../servo_arc" }
servo_atoms = {path = "../atoms", optional = true}
servo_config = {path = "../config", optional = true}
smallbitvec = "2.3.0"
smallvec = "0.6.6"
smallvec = "1.0"
string_cache = { version = "0.8", optional = true }
style_derive = {path = "../style_derive"}
style_traits = {path = "../style_traits"}

View file

@ -216,7 +216,7 @@ impl<E: TElement> StyleBloom<E> {
self.filter.clear();
self.pushed_hashes.clear();
} else {
for hash in self.pushed_hashes.drain() {
for hash in self.pushed_hashes.drain(..) {
self.filter.remove_hash(hash);
}
debug_assert!(self.filter.is_zeroed());
@ -233,7 +233,7 @@ impl<E: TElement> StyleBloom<E> {
element = parent;
}
for parent in parents_to_insert.drain().rev() {
for parent in parents_to_insert.drain(..).rev() {
self.push(parent);
}
}
@ -374,7 +374,7 @@ impl<E: TElement> StyleBloom<E> {
// Now the parents match, so insert the stack of elements we have been
// collecting so far.
for parent in parents_to_insert.drain().rev() {
for parent in parents_to_insert.drain(..).rev() {
self.push(parent);
}

View file

@ -698,7 +698,7 @@ where
}
}
sibling_invalidations.extend(new_sibling_invalidations.drain());
sibling_invalidations.extend(new_sibling_invalidations.drain(..));
invalidated_self
}

View file

@ -180,7 +180,7 @@ fn top_down_dom<'a, 'scope, E, D>(
let mut traversal_data_copy = traversal_data.clone();
traversal_data_copy.current_dom_depth += 1;
traverse_nodes(
discovered_child_nodes.drain(),
discovered_child_nodes.drain(..),
DispatchMode::NotTailCall,
recursion_ok,
root,
@ -210,7 +210,7 @@ fn top_down_dom<'a, 'scope, E, D>(
if !discovered_child_nodes.is_empty() {
traversal_data.current_dom_depth += 1;
traverse_nodes(
discovered_child_nodes.drain(),
discovered_child_nodes.drain(..),
DispatchMode::TailCall,
recursion_ok,
root,

View file

@ -1433,7 +1433,7 @@ fn report_css_errors(
selectors: Option<&SelectorList<SelectorImpl>>,
errors: &mut SmallParseErrorVec,
) {
for (error, slice, property) in errors.drain() {
for (error, slice, property) in errors.drain(..) {
report_one_css_error(context, Some(block), selectors, error, slice, property)
}
}

View file

@ -345,7 +345,7 @@ impl RuleTree {
important_author.sort_by_key(|&(_, order)| -order);
}
for (source, shadow_cascade_order) in important_author.drain() {
for (source, shadow_cascade_order) in important_author.drain(..) {
current = current.ensure_child(
self.root.downgrade(),
source,
@ -355,11 +355,11 @@ impl RuleTree {
);
}
for source in important_user.drain() {
for source in important_user.drain(..) {
current = current.ensure_child(self.root.downgrade(), source, UserImportant);
}
for source in important_ua.drain() {
for source in important_ua.drain(..) {
current = current.ensure_child(self.root.downgrade(), source, UAImportant);
}
@ -378,7 +378,7 @@ impl RuleTree {
guards: &StylesheetGuards,
) -> StrongRuleNode {
self.insert_ordered_rules_with_important(
applicable_declarations.drain().map(|d| d.for_rule_tree()),
applicable_declarations.drain(..).map(|d| d.for_rule_tree()),
guards,
)
}
@ -556,7 +556,7 @@ impl RuleTree {
// Now the rule is in the relevant place, push the children as
// necessary.
let rule = self.insert_ordered_rules_from(current, children.drain().rev());
let rule = self.insert_ordered_rules_from(current, children.drain(..).rev());
Some(rule)
}
@ -593,7 +593,7 @@ impl RuleTree {
}
let rule =
self.insert_ordered_rules_from(last.parent().unwrap().clone(), children.drain().rev());
self.insert_ordered_rules_from(last.parent().unwrap().clone(), children.drain(..).rev());
rule
}

View file

@ -1013,7 +1013,7 @@ impl Stylist {
);
if !declarations.is_empty() {
let rule_node = self.rule_tree.insert_ordered_rules_with_important(
declarations.drain().map(|a| a.for_rule_tree()),
declarations.drain(..).map(|a| a.for_rule_tree()),
guards,
);
if rule_node != *self.rule_tree.root() {

View file

@ -17,6 +17,6 @@ gecko = []
cssparser = "0.27"
servo_arc = { path = "../servo_arc" }
smallbitvec = "2.1.1"
smallvec = "0.6.6"
smallvec = "1.0"
string_cache = { version = "0.8", optional = true }
thin-slice = "0.1.0"