From 3b5cfa3ecf4e44b251ce121ab5dcf53c35de8eea Mon Sep 17 00:00:00 2001 From: Lukas Pustina Date: Fri, 18 Mar 2016 18:44:02 +0100 Subject: Tags new test as `no_run` and uses expect() --- src/libstd/process.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/process.rs b/src/libstd/process.rs index b21f745764c..9907cf32b35 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -507,17 +507,16 @@ impl Child { /// /// # Examples /// - /// ```should_panic + /// ```no_run /// use std::process::{Command, Stdio}; /// /// let mut child = Command::new("/bin/cat") /// .stdout(Stdio::piped()) /// .arg("file.txt") /// .spawn() - /// .unwrap_or_else(|e| { panic!("failed to execute child: {}", e) }); + /// .expect("failed to execute child"); /// - /// let ecode = child.wait_with_output() - /// .unwrap_or_else(|e| { panic!("failed to wait on child: {}", e) }); + /// let ecode = child.wait_with_output().expect("failed to wait on child"); /// /// assert!(ecode.success()); /// ``` -- cgit 1.4.1-3-g733a5