提交 6c6c23f9 编写于 作者: S Steve Klabnik

Small fixes to example to be more idiomatic

上级 b2f09c11
......@@ -264,7 +264,7 @@ pub fn spawn(&mut self) -> io::Result<Child> {
/// By default, stdin, stdout and stderr are captured (and used to
/// provide the resulting output).
///
/// # Example
/// # Examples
///
/// ```
/// # #![feature(process)]
......@@ -275,8 +275,8 @@ pub fn spawn(&mut self) -> io::Result<Child> {
/// });
///
/// 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> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册