Skip to content

Commit 9f851a7

Browse files
committed
Rollup merge of #23190 - steveklabnik:fix_as_slice, r=alexcrichton
2 parents 10960d3 + 6c6c23f commit 9f851a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libstd/process.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ impl Command {
264264
/// By default, stdin, stdout and stderr are captured (and used to
265265
/// provide the resulting output).
266266
///
267-
/// # Example
267+
/// # Examples
268268
///
269269
/// ```
270270
/// # #![feature(process)]
@@ -275,8 +275,8 @@ impl Command {
275275
/// });
276276
///
277277
/// println!("status: {}", output.status);
278-
/// println!("stdout: {}", String::from_utf8_lossy(output.stdout.as_slice()));
279-
/// println!("stderr: {}", String::from_utf8_lossy(output.stderr.as_slice()));
278+
/// println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
279+
/// println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
280280
/// ```
281281
#[stable(feature = "process", since = "1.0.0")]
282282
pub fn output(&mut self) -> io::Result<Output> {

0 commit comments

Comments
 (0)