diff --git a/components/selectors/parser.rs b/components/selectors/parser.rs index e9b59f7f831..06f381d600c 100644 --- a/components/selectors/parser.rs +++ b/components/selectors/parser.rs @@ -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); } diff --git a/components/style/stylist.rs b/components/style/stylist.rs index db444a53811..012ae046770 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -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);