about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorTshepang Lekhonkhobe <tshepang@gmail.com>2016-06-16 23:20:22 +0200
committerTshepang Lekhonkhobe <tshepang@gmail.com>2016-06-16 23:20:58 +0200
commit1253e82b7f14a544c3efc62f18dd2f1b6ffa4e0e (patch)
tree25716186a3b18689e89491d6465a903517234cc0 /src/libstd
parenta94881563c18e4ffca2e24aed4bd8f5de583cc91 (diff)
downloadrust-1253e82b7f14a544c3efc62f18dd2f1b6ffa4e0e.tar.gz
rust-1253e82b7f14a544c3efc62f18dd2f1b6ffa4e0e.zip
doc: fix mis-named binding & remove not needed `mut`
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/process.rs17
1 files 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")]