1
Fork 0

impl Default for ExitCode

As suggested here
  https://github.com/rust-lang/rust/pull/106425#issuecomment-1382952598
This commit is contained in:
Ian Jackson 2023-08-07 16:08:19 +01:00
parent d60d63fbf7
commit b8f6d48eb6
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -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")] #[stable(feature = "process_exitcode", since = "1.61.0")]
impl From<u8> for ExitCode { impl From<u8> for ExitCode {
/// Construct an `ExitCode` from an arbitrary u8 value. /// Construct an `ExitCode` from an arbitrary u8 value.