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