diff options
| author | Ximin Luo <infinity0@pwned.gg> | 2020-07-27 03:00:28 +0100 |
|---|---|---|
| committer | Ximin Luo <infinity0@pwned.gg> | 2020-07-27 03:00:28 +0100 |
| commit | b99668bd221ea2fe99141e7de6db6a4b86efb7b6 (patch) | |
| tree | 00f19dc752a298ba8fb581fabf340d16c68afe25 /src/bootstrap | |
| parent | 0cf17e750d7790e0f2fc1fb184b6f917f55462ca (diff) | |
| download | rust-b99668bd221ea2fe99141e7de6db6a4b86efb7b6.tar.gz rust-b99668bd221ea2fe99141e7de6db6a4b86efb7b6.zip | |
rustbuild: rename exec_cmd -> status_code for clarity
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index c8ee4cb0cd2..af75faf698e 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -153,7 +153,7 @@ fn main() { e => e, }; println!("\nDid not run successfully: {:?}\n{:?}\n-------------", e, cmd); - exec_cmd(&mut on_fail).expect("could not run the backup command"); + status_code(&mut on_fail).expect("could not run the backup command"); std::process::exit(1); } @@ -182,10 +182,10 @@ fn main() { } } - let code = exec_cmd(&mut cmd).unwrap_or_else(|_| panic!("\n\n failed to run {:?}", cmd)); + let code = status_code(&mut cmd).unwrap_or_else(|_| panic!("\n\n failed to run {:?}", cmd)); std::process::exit(code); } -fn exec_cmd(cmd: &mut Command) -> io::Result<i32> { +fn status_code(cmd: &mut Command) -> io::Result<i32> { cmd.status().map(|status| status.code().unwrap()) } |
