Skip to content

Commit 3b5cfa3

Browse files
committed
Tags new test as no_run and uses expect()
1 parent 8d61cb2 commit 3b5cfa3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/libstd/process.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -507,17 +507,16 @@ impl Child {
507507
///
508508
/// # Examples
509509
///
510-
/// ```should_panic
510+
/// ```no_run
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-
/// .unwrap_or_else(|e| { panic!("failed to execute child: {}", e) });
517+
/// .expect("failed to execute child");
518518
///
519-
/// let ecode = child.wait_with_output()
520-
/// .unwrap_or_else(|e| { panic!("failed to wait on child: {}", e) });
519+
/// let ecode = child.wait_with_output().expect("failed to wait on child");
521520
///
522521
/// assert!(ecode.success());
523522
/// ```

0 commit comments

Comments
 (0)