forked from mirrors/jj
style: use explicit loop instead of .for_each()
in simple cases
This commit is contained in:
parent
43711de61c
commit
6368544f4f
2 changed files with 3 additions and 2 deletions
|
@ -136,6 +136,7 @@ testutils = { path = "lib/testutils" }
|
|||
explicit_iter_loop = "warn"
|
||||
flat_map_option = "warn"
|
||||
implicit_clone = "warn"
|
||||
needless_for_each = "warn"
|
||||
semicolon_if_nothing_returned = "warn"
|
||||
uninlined_format_args = "warn"
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue