impl Default for ExitCode
As suggested here https://github.com/rust-lang/rust/pull/106425#issuecomment-1382952598
This commit is contained in:
parent
d60d63fbf7
commit
b8f6d48eb6
1 changed files with 8 additions and 0 deletions
|
@ -1960,6 +1960,14 @@ impl ExitCode {
|
|||
}
|
||||
}
|
||||
|
||||
/// The default value is [`ExitCode::SUCCESS`]
|
||||
#[stable(feature = "process-exitcode-default", since = "CURRENT_RUSTC_VERSION")]
|
||||
impl Default for ExitCode {
|
||||
fn default() -> Self {
|
||||
ExitCode::SUCCESS
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "process_exitcode", since = "1.61.0")]
|
||||
impl From<u8> for ExitCode {
|
||||
/// Construct an `ExitCode` from an arbitrary u8 value.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue