Skip to content

Commit 0d8bcc3

Browse files
committed
added some comments
1 parent 9e55310 commit 0d8bcc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bootstrap/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1631,10 +1631,11 @@ fn chmod(_path: &Path, _perms: u32) {}
16311631
/// If code is not 0 (successful exit status), exit status is 101 (rust's default error code.)
16321632
/// If the test is running and code is an error code, it will cause a panic.
16331633
fn detail_exit(code: i32) -> ! {
1634-
// Successful exit
1634+
// if in test and code is an error code, panic with staus code provided
16351635
if cfg!(test) && code != 0 {
16361636
panic!("status code: {}", code);
16371637
} else {
1638+
//otherwise,exit with provided status code
16381639
std::process::exit(code);
16391640
}
16401641
}

0 commit comments

Comments
 (0)