added some comments
This commit is contained in:
parent
9e553108c7
commit
0d8bcc3dc5
1 changed files with 2 additions and 1 deletions
|
@ -1631,10 +1631,11 @@ fn chmod(_path: &Path, _perms: u32) {}
|
||||||
/// If code is not 0 (successful exit status), exit status is 101 (rust's default error code.)
|
/// If code is not 0 (successful exit status), exit status is 101 (rust's default error code.)
|
||||||
/// If the test is running and code is an error code, it will cause a panic.
|
/// If the test is running and code is an error code, it will cause a panic.
|
||||||
fn detail_exit(code: i32) -> ! {
|
fn detail_exit(code: i32) -> ! {
|
||||||
// Successful exit
|
// if in test and code is an error code, panic with staus code provided
|
||||||
if cfg!(test) && code != 0 {
|
if cfg!(test) && code != 0 {
|
||||||
panic!("status code: {}", code);
|
panic!("status code: {}", code);
|
||||||
} else {
|
} else {
|
||||||
|
//otherwise,exit with provided status code
|
||||||
std::process::exit(code);
|
std::process::exit(code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue