Skip to content

Commit 7a48ba1

Browse files
committed
remove unneeded collect.
1 parent 0430af5 commit 7a48ba1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/parser/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,10 +609,7 @@ where
609609
// explicit stack for post-order traversal: (node, visited)
610610
let mut stack: Vec<(Node<'a>, bool)> = Vec::new();
611611

612-
// Collect children first to avoid holding an iterator borrow on
613-
// the container while we later may need to mutably borrow it.
614-
let children: Vec<_> = container.children().collect();
615-
for ch in children {
612+
for ch in container.children() {
616613
stack.push((ch, false));
617614

618615
while let Some((node, visited)) = stack.pop() {

0 commit comments

Comments
 (0)