about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorLukas Pustina <lukas.pustina@centerdevice.com>2016-03-18 18:44:02 +0100
committerLukas Pustina <lukas.pustina@centerdevice.com>2016-03-18 20:24:31 +0100
commit3b5cfa3ecf4e44b251ce121ab5dcf53c35de8eea (patch)
tree19534bf6700e8d7439cdc5d6dfe499a10d0d3b93 /src/libstd
parent8d61cb245d10bb2a61928cfa8651b1e88e7b115a (diff)
downloadrust-3b5cfa3ecf4e44b251ce121ab5dcf53c35de8eea.tar.gz
rust-3b5cfa3ecf4e44b251ce121ab5dcf53c35de8eea.zip
Tags new test as `no_run` and uses expect()
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/process.rs7
1 files changed, 3 insertions, 4 deletions
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());
     /// ```