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 3b5cfa3 commit aefbbc7Copy full SHA for aefbbc7
src/libstd/process.rs
@@ -507,16 +507,17 @@ impl Child {
507
///
508
/// # Examples
509
510
- /// ```no_run
+ /// ```should_panic
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
- /// .expect("failed to execute child");
+ /// .unwrap_or_else(|e| { panic!("failed to execute child: {}", e) });
518
519
- /// let ecode = child.wait_with_output().expect("failed to wait on child");
+ /// let ecode = child.wait_with_output()
520
+ /// .unwrap_or_else(|e| { panic!("failed to wait on child: {}", e) });
521
522
/// assert!(ecode.success());
523
/// ```
0 commit comments