]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/process.rs
Rollup merge of #93824 - Amanieu:stable_cfg_target_has_atomic, r=davidtwco
[rust.git] / library / std / src / process.rs
index 7d7e08a714938007f77cfaeee752b6cb5e2038c6..1f04890539604e98d04e4cf8b60f0ae68a65f38d 100644 (file)
@@ -1691,6 +1691,14 @@ pub fn to_i32(self) -> i32 {
     }
 }
 
+#[unstable(feature = "process_exitcode_placeholder", issue = "48711")]
+impl From<u8> for ExitCode {
+    /// Construct an exit code from an arbitrary u8 value.
+    fn from(code: u8) -> Self {
+        ExitCode(imp::ExitCode::from(code))
+    }
+}
+
 impl Child {
     /// Forces the child process to exit. If the child has already exited, an [`InvalidInput`]
     /// error is returned.