Skip to content

Commit

Permalink
Bug 1601732 - Update in-tree dependencies to smallvec 1.0. r=glandium
Browse files Browse the repository at this point in the history
We're vendoring it already so no reason not to. Only a couple dependencies left
after these to get rid of 0.6.

Differential Revision: https://phabricator.services.mozilla.com/D56044

--HG--
extra : moz-landing-system : lando
  • Loading branch information
emilio committed Dec 5, 2019
1 parent d87305d commit 4695746
Show file tree
Hide file tree
Showing 25 changed files with 136 additions and 137 deletions.
39 changes: 19 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion build/workspace-hack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ syn = { features = ["clone-impls", "default", "derive", "extra-traits", "fold",
log = { features = ["release_max_level_info", "release_max_level_warn", "std"], version = "0.4.6" }
serde = { features = ["default", "derive", "rc", "serde_derive", "std"], version = "1.0.66" }
serde_derive = { features = ["default", "deserialize_in_place"], version = "1.0.66" }
smallvec = { features = ["default", "serde", "std"], version = "0.6.10" }
quote = { features = ["default", "proc-macro"], version = "1.0" }
proc-macro2 = { features = ["default", "proc-macro"], version = "0.4.27" }
libc = { features = ["default", "std", "use_std"], version = "0.2" }
Expand Down
2 changes: 1 addition & 1 deletion gfx/wgpu/wgpu-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ parking_lot = "0.9"
rendy-memory = "0.5"
rendy-descriptor = "0.5"
serde = { version = "1.0", features = ["serde_derive"], optional = true }
smallvec = "0.6"
smallvec = "1.0"
vec_map = "0.8"

[target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion js/src/wasm/cranelift/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cranelift-codegen = { version = "0.51", default-features = false }
cranelift-wasm = "0.51"
log = { version = "0.4.6", default-features = false, features = ["release_max_level_info"] }
env_logger = "0.6"
smallvec = { version = "0.6.6" }
smallvec = "1.0"

[build-dependencies]
bindgen = {version = "0.51.1", default-features = false} # disable `logging` to reduce code size
Expand Down
2 changes: 1 addition & 1 deletion servo/components/fallible/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion servo/components/malloc_size_of/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion servo/components/selectors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
4 changes: 2 additions & 2 deletions servo/components/selectors/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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> {
Expand Down
2 changes: 1 addition & 1 deletion servo/components/style/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
static_prefs = { path = "../../../modules/libpref/init/static_prefs" }
string_cache = { version = "0.8", optional = true }
style_derive = {path = "../style_derive"}
Expand Down
6 changes: 3 additions & 3 deletions servo/components/style/bloom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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);
}
}
Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion servo/components/style/invalidation/element/invalidator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ where
}
}

sibling_invalidations.extend(new_sibling_invalidations.drain());
sibling_invalidations.extend(new_sibling_invalidations.drain(..));
invalidated_self
}

Expand Down
4 changes: 2 additions & 2 deletions servo/components/style/parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion servo/components/style/properties/declaration_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
12 changes: 6 additions & 6 deletions servo/components/style/rule_tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
}

Expand All @@ -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,
)
}
Expand Down Expand Up @@ -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)
}

Expand Down Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion servo/components/style/stylist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion servo/components/to_shmem/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion servo/ports/geckolib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ num-traits = "0.2"
parking_lot = "0.9"
selectors = {path = "../../components/selectors"}
servo_arc = {path = "../../components/servo_arc"}
smallvec = "0.6"
smallvec = "1.0"
style = {path = "../../components/style", features = ["gecko"]}
style_traits = {path = "../../components/style_traits"}
to_shmem = {path = "../../components/to_shmem"}
2 changes: 1 addition & 1 deletion servo/ports/geckolib/tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ malloc_size_of = {path = "../../../components/malloc_size_of"}
num-traits = "0.2"
selectors = {path = "../../../components/selectors"}
size_of_test = {path = "../../../components/size_of_test"}
smallvec = "0.6"
smallvec = "1.0"
style_traits = {path = "../../../components/style_traits"}
style = {path = "../../../components/style", features = ["gecko"]}
to_shmem = {path = "../../../components/to_shmem"}
Loading

0 comments on commit 4695746

Please sign in to comment.