Rollup merge of #115440 - RalfJung:bootstrap-fmt, r=Mark-Simulacrum

bootstrap/format: remove unnecessary paths.push

Cc https://github.com/rust-lang/rust/pull/106415#pullrequestreview-1606367042
I verified that this still formats all fileds when `get_modified_rs_files` is made to return an error.

r? ``@Nilstrieb``
This commit is contained in:
Matthias Krüger 2023-09-11 17:03:30 +02:00 committed by GitHub
commit 0a7451033b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
@ -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());
}
}
}