diff --git a/Cargo.toml b/Cargo.toml index 4bda1245b7..473d64745b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -136,6 +136,7 @@ testutils = { path = "lib/testutils" } explicit_iter_loop = "deny" flat_map_option = "deny" implicit_clone = "deny" +needless_for_each = "deny" redundant_else = "deny" semicolon_if_nothing_returned = "deny" uninlined_format_args = "deny" diff --git a/cli/src/movement_util.rs b/cli/src/movement_util.rs index eadc059a3b..9d5913a804 100644 --- a/cli/src/movement_util.rs +++ b/cli/src/movement_util.rs @@ -101,7 +101,7 @@ impl Direction { let template = workspace_command.commit_summary_template(); let mut cmd_err = user_error(err_msg); - commits.iter().for_each(|commit| { + for commit in commits { cmd_err.add_formatted_hint_with(|formatter| { if args.should_edit { write!(formatter, "Working copy: ")?; @@ -110,7 +110,7 @@ impl Direction { } template.format(commit, formatter) }); - }); + } cmd_err }