diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-03-08 12:07:58 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-03-08 12:07:58 -0400 |
| commit | 6c6c23f9dfc98ad0a6ebc596de197aedd3a79889 (patch) | |
| tree | 7ef7cf49084c3f3bcdc9248ad588e890ddbb96a2 /src/libstd/process.rs | |
| parent | b2f09c1165db805ed00707257dd94bb309faf0fe (diff) | |
| download | rust-6c6c23f9dfc98ad0a6ebc596de197aedd3a79889.tar.gz rust-6c6c23f9dfc98ad0a6ebc596de197aedd3a79889.zip | |
Small fixes to example to be more idiomatic
Diffstat (limited to 'src/libstd/process.rs')
| -rw-r--r-- | src/libstd/process.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs index 79028f49e68..d4392a0740a 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -264,7 +264,7 @@ impl Command { /// By default, stdin, stdout and stderr are captured (and used to /// provide the resulting output). /// - /// # Example + /// # Examples /// /// ``` /// # #![feature(process)] @@ -275,8 +275,8 @@ impl Command { /// }); /// /// println!("status: {}", output.status); - /// println!("stdout: {}", String::from_utf8_lossy(output.stdout.as_slice())); - /// println!("stderr: {}", String::from_utf8_lossy(output.stderr.as_slice())); + /// println!("stdout: {}", String::from_utf8_lossy(&output.stdout)); + /// println!("stderr: {}", String::from_utf8_lossy(&output.stderr)); /// ``` #[stable(feature = "process", since = "1.0.0")] pub fn output(&mut self) -> io::Result<Output> { |
