Skip to content

Commit 8545424

Browse files
authored
Auto merge of #34314 - tshepang:misnamed, r=steveklabnik
doc: fix mis-named binding & remove not needed `mut`
2 parents 646015c + 1253e82 commit 8545424

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/libstd/process.rs

+9-8
Original file line numberDiff line numberDiff line change
@@ -713,16 +713,17 @@ impl Child {
713713
/// ```should_panic
714714
/// use std::process::{Command, Stdio};
715715
///
716-
/// let mut child = Command::new("/bin/cat")
717-
/// .arg("file.txt")
718-
/// .stdout(Stdio::piped())
719-
/// .spawn()
720-
/// .expect("failed to execute child");
716+
/// let child = Command::new("/bin/cat")
717+
/// .arg("file.txt")
718+
/// .stdout(Stdio::piped())
719+
/// .spawn()
720+
/// .expect("failed to execute child");
721721
///
722-
/// let ecode = child.wait_with_output()
723-
/// .expect("failed to wait on child");
722+
/// let output = child
723+
/// .wait_with_output()
724+
/// .expect("failed to wait on child");
724725
///
725-
/// assert!(ecode.status.success());
726+
/// assert!(output.status.success());
726727
/// ```
727728
///
728729
#[stable(feature = "process", since = "1.0.0")]

0 commit comments

Comments
 (0)