Skip to content

Commit

Permalink
Rollup merge of rust-lang#115440 - RalfJung:bootstrap-fmt, r=Mark-Sim…
Browse files Browse the repository at this point in the history
…ulacrum

bootstrap/format: remove unnecessary paths.push

Cc rust-lang#106415 (review)
I verified that this still formats all fileds when `get_modified_rs_files` is made to return an error.

r? `@Nilstrieb`
  • Loading branch information
matthiaskrgr authored Sep 11, 2023
2 parents 345ea1e + b8e0e79 commit 07e21c3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/bootstrap/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ pub fn format(build: &Builder<'_>, check: bool, paths: &[PathBuf]) {
Err(_) => false,
};

let mut paths = paths.to_vec();

if git_available {
let in_working_tree = match build
.config
Expand Down Expand Up @@ -201,8 +199,6 @@ pub fn format(build: &Builder<'_>, check: bool, paths: &[PathBuf]) {
"WARN: Something went wrong when running git commands:\n{err}\n\
Falling back to formatting all files."
);
// Something went wrong when getting the version. Just format all the files.
paths.push(".".into());
}
}
}
Expand Down

0 comments on commit 07e21c3

Please sign in to comment.