about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-09-11 17:03:30 +0200
committerGitHub <noreply@github.com>2023-09-11 17:03:30 +0200
commit0a7451033b1da9f785e29c2d272f3c0d53681ef3 (patch)
tree520e056782e3251990a7bfeb55072f1b4a350271
parentb99af95713964eff0817d910fcc50c08a82c9aa8 (diff)
parentb8e0e797e701f60bd975b3f8a295e1cb1a1de58c (diff)
downloadrust-0a7451033b1da9f785e29c2d272f3c0d53681ef3.tar.gz
rust-0a7451033b1da9f785e29c2d272f3c0d53681ef3.zip
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``
-rw-r--r--src/bootstrap/format.rs4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/bootstrap/format.rs b/src/bootstrap/format.rs
index d658be0b8eb..11f2762f766 100644
--- a/src/bootstrap/format.rs
+++ b/src/bootstrap/format.rs
@@ -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());
                     }
                 }
             }