Skip to content

Commit f7f6d28

Browse files
committed
mbe: Use extend instead of push in loop
1 parent 5e2f9e3 commit f7f6d28

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

crates/mbe/src/expander/matcher.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,7 @@ impl BindingsBuilder {
269269
LinkNode::Parent { idx, len } => self.collect_nested_ref(idx, len, &mut nested_refs),
270270
});
271271
nested_refs.push(last);
272-
273-
nested_refs.into_iter().for_each(|iter| {
274-
let child_bindings = self.build_inner(iter);
275-
nested.push(child_bindings)
276-
})
272+
nested.extend(nested_refs.into_iter().map(|iter| self.build_inner(iter)));
277273
}
278274

279275
fn collect_nodes_ref<'a>(

0 commit comments

Comments
 (0)