Skip to content

Commit

Permalink
rustbuild: format both Ok/Err separately, since Result doesn't do it
Browse files Browse the repository at this point in the history
  • Loading branch information
infinity0 committed Jul 27, 2020
1 parent 84896c7 commit 3dcab29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bootstrap/bin/rustc.rs
Expand Up @@ -149,8 +149,8 @@ fn main() {

if let Some(mut on_fail) = on_fail {
let e = match cmd.status() {
Ok(s) if s.success() => std::process::exit(0),
e => e,
Ok(s) => if s.success() { std::process::exit(0) } else { format!("Ok({})", s) },
Err(e) => format!("Err({})", e),
};
println!("\nDid not run successfully: {}\n{:?}\n-------------", e, cmd);
status_code(&mut on_fail).expect("could not run the backup command");
Expand Down

0 comments on commit 3dcab29

Please sign in to comment.