Skip to content

Commit b880806

Browse files
committed
chore
1 parent 174e36f commit b880806

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

src/bootstrap/src/core/config/config.rs

+16-13
Original file line numberDiff line numberDiff line change
@@ -1351,9 +1351,9 @@ impl Config {
13511351
config.out = Path::new(
13521352
&env::var_os("CARGO_TARGET_DIR").expect("cargo test directly is not supported"),
13531353
)
1354-
.parent()
1355-
.unwrap()
1356-
.to_path_buf();
1354+
.parent()
1355+
.unwrap()
1356+
.to_path_buf();
13571357
}
13581358

13591359
config.stage0_metadata = build_helper::stage0_parser::parse_stage0_file();
@@ -2395,11 +2395,11 @@ impl Config {
23952395
println!("WARNING: CI rustc has some fields that are no longer supported in bootstrap; download-rustc will be disabled.");
23962396
println!("HELP: Consider rebasing to a newer commit if available.");
23972397
return None;
2398-
},
2398+
}
23992399
Err(e) => {
24002400
eprintln!("ERROR: Failed to parse CI rustc config.toml: {e}");
24012401
exit!(2);
2402-
},
2402+
}
24032403
};
24042404

24052405
let current_config_toml = Self::get_toml(config_path).unwrap();
@@ -2413,7 +2413,7 @@ impl Config {
24132413

24142414
let disable_ci_rustc_if_incompatible =
24152415
env::var_os("DISABLE_CI_RUSTC_IF_INCOMPATIBLE")
2416-
.is_some_and(|s| s == "1" || s == "true");
2416+
.is_some_and(|s| s == "1" || s == "true");
24172417

24182418
if disable_ci_rustc_if_incompatible && res.is_err() {
24192419
println!("WARNING: download-rustc is disabled with `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` env.");
@@ -2620,7 +2620,7 @@ impl Config {
26202620
.args(["symbolic-ref", "--short", "HEAD"])
26212621
.as_command_mut(),
26222622
)
2623-
.map(|b| b.trim().to_owned());
2623+
.map(|b| b.trim().to_owned());
26242624

26252625
let mut git = helpers::git(Some(&self.src)).allow_failure();
26262626
git.run_always();
@@ -2689,11 +2689,11 @@ impl Config {
26892689
let source_version = semver::Version::parse(
26902690
fs::read_to_string(self.src.join("src/version")).unwrap().trim(),
26912691
)
2692-
.unwrap();
2692+
.unwrap();
26932693
if !(source_version == stage0_version
26942694
|| (source_version.major == stage0_version.major
2695-
&& (source_version.minor == stage0_version.minor
2696-
|| source_version.minor == stage0_version.minor + 1)))
2695+
&& (source_version.minor == stage0_version.minor
2696+
|| source_version.minor == stage0_version.minor + 1)))
26972697
{
26982698
let prev_version = format!("{}.{}.x", source_version.major, source_version.minor - 1);
26992699
fail(&format!(
@@ -2845,10 +2845,13 @@ impl Config {
28452845
if_unchanged: bool,
28462846
) -> Option<bool> {
28472847
let mut git = helpers::git(Some(&self.src));
2848-
git.args(["diff-index", "--quiet", commit, "--"]);
2848+
git.args(["diff-index", "--quiet", commit]);
28492849

2850-
for dir in dirs {
2851-
git.arg(self.src.join(dir));
2850+
if !dirs.is_empty() {
2851+
git.arg("--");
2852+
for dir in dirs {
2853+
git.arg(self.src.join(dir));
2854+
}
28522855
}
28532856

28542857
let has_changes = !t!(git.as_command_mut().status()).success();

0 commit comments

Comments
 (0)