Fix clippy::explicit_iter_loop (pedantic)

“it is more concise to loop over references to containers instead of
using explicit iteration methods”

https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2022-11-21 17:44:40 -08:00
committed by Charlie Marsh
parent 6b935121a7
commit 3dd6522b4f
6 changed files with 9 additions and 9 deletions

View File

@@ -31,7 +31,7 @@ where
}
ExprKind::Lambda { args, body } => {
visitor::walk_expr(self, body);
for arg in args.args.iter() {
for arg in &args.args {
self.names.remove(arg.node.arg.as_str());
}
}