From 1253e82b7f14a544c3efc62f18dd2f1b6ffa4e0e Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 16 Jun 2016 23:20:22 +0200 Subject: [PATCH] doc: fix mis-named binding & remove not needed `mut` --- src/libstd/process.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/libstd/process.rs b/src/libstd/process.rs index 96ddda32ae4..2edd1a30638 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -713,16 +713,17 @@ impl Child { /// ```should_panic /// use std::process::{Command, Stdio}; /// - /// let mut child = Command::new("/bin/cat") - /// .arg("file.txt") - /// .stdout(Stdio::piped()) - /// .spawn() - /// .expect("failed to execute child"); + /// let child = Command::new("/bin/cat") + /// .arg("file.txt") + /// .stdout(Stdio::piped()) + /// .spawn() + /// .expect("failed to execute child"); /// - /// let ecode = child.wait_with_output() - /// .expect("failed to wait on child"); + /// let output = 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")]