Add From<u8> for ExitCode
This should cover a mostly cross-platform subset of supported exit codes.
This commit is contained in:
@@ -162,6 +162,15 @@ impl ExitCode {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<u8> for ExitCode {
|
||||
fn from(code: u8) -> Self {
|
||||
match code {
|
||||
0 => Self::SUCCESS,
|
||||
1..255 => Self::FAILURE,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Process(!);
|
||||
|
||||
impl Process {
|
||||
|
||||
Reference in New Issue
Block a user