diff options
| author | Lukas Pustina <lukas.pustina@centerdevice.com> | 2016-03-19 10:41:13 +0100 |
|---|---|---|
| committer | Lukas Pustina <lukas.pustina@centerdevice.com> | 2016-03-19 10:41:13 +0100 |
| commit | aefbbc79a3d0c082e19fe3368604dab91333f8a9 (patch) | |
| tree | 36e7cfb64ab7e9b78cbce01de0dd70dd7736507c /src/libstd | |
| parent | 3b5cfa3ecf4e44b251ce121ab5dcf53c35de8eea (diff) | |
| download | rust-aefbbc79a3d0c082e19fe3368604dab91333f8a9.tar.gz rust-aefbbc79a3d0c082e19fe3368604dab91333f8a9.zip | |
Revert "Tags new test as `no_run` and uses expect()"
- After discussing with @alexcrichton, the initial commit has been fine. This reverts commit 3b5cfa3ecf4e44b251ce121ab5dcf53c35de8eea.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/process.rs | 7 |
1 files changed, 4 insertions, 3 deletions
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()); /// ``` |
