Skip to content

Commit aefbbc7

Browse files
committed
Revert "Tags new test as no_run and uses expect()"
- After discussing with @alexcrichton, the initial commit has been fine. This reverts commit 3b5cfa3.
1 parent 3b5cfa3 commit aefbbc7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/libstd/process.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,16 +507,17 @@ impl Child {
507507
///
508508
/// # Examples
509509
///
510-
/// ```no_run
510+
/// ```should_panic
511511
/// use std::process::{Command, Stdio};
512512
///
513513
/// let mut child = Command::new("/bin/cat")
514514
/// .stdout(Stdio::piped())
515515
/// .arg("file.txt")
516516
/// .spawn()
517-
/// .expect("failed to execute child");
517+
/// .unwrap_or_else(|e| { panic!("failed to execute child: {}", e) });
518518
///
519-
/// let ecode = child.wait_with_output().expect("failed to wait on child");
519+
/// let ecode = child.wait_with_output()
520+
/// .unwrap_or_else(|e| { panic!("failed to wait on child: {}", e) });
520521
///
521522
/// assert!(ecode.success());
522523
/// ```

0 commit comments

Comments
 (0)