doc: fix mis-named binding & remove not needed mut
This commit is contained in:
parent
a94881563c
commit
1253e82b7f
1 changed files with 9 additions and 8 deletions
|
@ -713,16 +713,17 @@ impl Child {
|
||||||
/// ```should_panic
|
/// ```should_panic
|
||||||
/// use std::process::{Command, Stdio};
|
/// use std::process::{Command, Stdio};
|
||||||
///
|
///
|
||||||
/// let mut child = Command::new("/bin/cat")
|
/// let child = Command::new("/bin/cat")
|
||||||
/// .arg("file.txt")
|
/// .arg("file.txt")
|
||||||
/// .stdout(Stdio::piped())
|
/// .stdout(Stdio::piped())
|
||||||
/// .spawn()
|
/// .spawn()
|
||||||
/// .expect("failed to execute child");
|
/// .expect("failed to execute child");
|
||||||
///
|
///
|
||||||
/// let ecode = child.wait_with_output()
|
/// let output = child
|
||||||
/// .expect("failed to wait on child");
|
/// .wait_with_output()
|
||||||
|
/// .expect("failed to wait on child");
|
||||||
///
|
///
|
||||||
/// assert!(ecode.status.success());
|
/// assert!(output.status.success());
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
#[stable(feature = "process", since = "1.0.0")]
|
#[stable(feature = "process", since = "1.0.0")]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue