diff options
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index ac21c9eefc2..f46cbc0be11 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -1629,8 +1629,7 @@ impl Node { Node::adopt(node, &*parent.owner_doc()); } // Step 2. - let mut removed_nodes = RootedVec::new(); - removed_nodes.extend(parent.children().map(|child| JS::from_rooted(&child))); + let removed_nodes = parent.children().collect::<RootedVec<_>>(); // Step 3. let mut added_nodes = RootedVec::new(); let added_nodes = if let Some(node) = node.as_ref() { |