Small fixes to example to be more idiomatic

This commit is contained in:
Steve Klabnik 2015-03-08 12:07:58 -04:00
parent b2f09c1165
commit 6c6c23f9df

View File

@ -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> {