bootstrap/format: remove unnecessary paths.push

This commit is contained in:
Ralf Jung 2023-09-01 17:04:44 +02:00
parent 1accf068d8
commit b8e0e797e7

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