diff options
| author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2023-08-07 16:08:19 +0100 |
|---|---|---|
| committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2023-08-07 16:08:19 +0100 |
| commit | b8f6d48eb6a551b9fd4b134ad68bc5a5f95e3a39 (patch) | |
| tree | d1832e5e0b3759f39b449e9d16aab32f5d41ea4b | |
| parent | d60d63fbf7565daba4b9cc46cbbfabc366aeff63 (diff) | |
| download | rust-b8f6d48eb6a551b9fd4b134ad68bc5a5f95e3a39.tar.gz rust-b8f6d48eb6a551b9fd4b134ad68bc5a5f95e3a39.zip | |
impl Default for ExitCode
As suggested here https://github.com/rust-lang/rust/pull/106425#issuecomment-1382952598
| -rw-r--r-- | library/std/src/process.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/library/std/src/process.rs b/library/std/src/process.rs index 47e28c27a83..bb94596425c 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -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. |
