mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #17952 - bholley:drain_smallvec, r=emilio
Use drain() over IntoIter on a few SmallVecs This is all the ones I could find in style/ and selectors/. See https://bugzilla.mozilla.org/show_bug.cgi?id=1374848 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17952) <!-- Reviewable:end -->
This commit is contained in:
commit
27d1fbe7ea
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));
|
||||
for state_selector in state_selectors.into_iter() {
|
||||
for state_selector in state_selectors.drain() {
|
||||
builder.push_simple_selector(state_selector);
|
||||
}
|
||||
|
||||
|
|
|
@ -942,7 +942,7 @@ impl Stylist {
|
|||
if !declarations.is_empty() {
|
||||
let rule_node =
|
||||
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);
|
||||
if rule_node != *self.rule_tree.root() {
|
||||
inputs.visited_rules = Some(rule_node);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue