Skip to content

Commit b99668b

Browse files
committed
rustbuild: rename exec_cmd -> status_code for clarity
1 parent 0cf17e7 commit b99668b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bootstrap/bin/rustc.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ fn main() {
153153
e => e,
154154
};
155155
println!("\nDid not run successfully: {:?}\n{:?}\n-------------", e, cmd);
156-
exec_cmd(&mut on_fail).expect("could not run the backup command");
156+
status_code(&mut on_fail).expect("could not run the backup command");
157157
std::process::exit(1);
158158
}
159159

@@ -182,10 +182,10 @@ fn main() {
182182
}
183183
}
184184

185-
let code = exec_cmd(&mut cmd).unwrap_or_else(|_| panic!("\n\n failed to run {:?}", cmd));
185+
let code = status_code(&mut cmd).unwrap_or_else(|_| panic!("\n\n failed to run {:?}", cmd));
186186
std::process::exit(code);
187187
}
188188

189-
fn exec_cmd(cmd: &mut Command) -> io::Result<i32> {
189+
fn status_code(cmd: &mut Command) -> io::Result<i32> {
190190
cmd.status().map(|status| status.code().unwrap())
191191
}

0 commit comments

Comments
 (0)