We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
no_run
1 parent 8d61cb2 commit 3b5cfa3Copy full SHA for 3b5cfa3
src/libstd/process.rs
@@ -507,17 +507,16 @@ impl Child {
507
///
508
/// # Examples
509
510
- /// ```should_panic
+ /// ```no_run
511
/// use std::process::{Command, Stdio};
512
513
/// let mut child = Command::new("/bin/cat")
514
/// .stdout(Stdio::piped())
515
/// .arg("file.txt")
516
/// .spawn()
517
- /// .unwrap_or_else(|e| { panic!("failed to execute child: {}", e) });
+ /// .expect("failed to execute child");
518
519
- /// let ecode = child.wait_with_output()
520
- /// .unwrap_or_else(|e| { panic!("failed to wait on child: {}", e) });
+ /// let ecode = child.wait_with_output().expect("failed to wait on child");
521
522
/// assert!(ecode.success());
523
/// ```
0 commit comments