mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Use drain() over IntoIter on a few SmallVecs.
This is all the ones I could find in style/ and selectors/.
This commit is contained in:
parent
e07beacd4d
commit
5a421d7c5f
2 changed files with 2 additions and 2 deletions
|
@ -1528,7 +1528,7 @@ fn parse_compound_selector<'i, 't, P, E, Impl>(
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.push_simple_selector(Component::PseudoElement(p));
|
builder.push_simple_selector(Component::PseudoElement(p));
|
||||||
for state_selector in state_selectors.into_iter() {
|
for state_selector in state_selectors.drain() {
|
||||||
builder.push_simple_selector(state_selector);
|
builder.push_simple_selector(state_selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -939,7 +939,7 @@ impl Stylist {
|
||||||
if !declarations.is_empty() {
|
if !declarations.is_empty() {
|
||||||
let rule_node =
|
let rule_node =
|
||||||
self.rule_tree.insert_ordered_rules_with_important(
|
self.rule_tree.insert_ordered_rules_with_important(
|
||||||
declarations.into_iter().map(|a| a.order_and_level()),
|
declarations.drain().map(|a| a.order_and_level()),
|
||||||
guards);
|
guards);
|
||||||
if rule_node != *self.rule_tree.root() {
|
if rule_node != *self.rule_tree.root() {
|
||||||
inputs.visited_rules = Some(rule_node);
|
inputs.visited_rules = Some(rule_node);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue