We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4945db4 commit 5a0d97cCopy full SHA for 5a0d97c
library/std/src/process.rs
@@ -1303,6 +1303,16 @@ impl Output {
1303
/// This is usually correct for command-line applications.
1304
/// * Capture `stderr` using a custom error type.
1305
/// This is usually correct for libraries.
1306
+ ///
1307
+ /// # Examples
1308
1309
+ /// ```
1310
+ /// #![feature(exit_status_error)]
1311
+ /// # #[cfg(unix)] {
1312
+ /// use std::process::Command;
1313
+ /// assert!(Command::new("false").output().exit_ok().is_err());
1314
+ /// # }
1315
1316
#[unstable(feature = "exit_status_error", issue = "84908")]
1317
pub fn exit_ok(self) -> Result<Self, ExitStatusError> {
1318
self.status.exit_ok()?;
0 commit comments