Remove unnecessarily mutable reference in doc example.

This commit is contained in:
Corey Farwell 2016-07-07 21:37:31 -04:00
parent 2ad5ed07f8
commit fc2123a69a
1 changed files with 2 additions and 2 deletions

View File

@ -152,8 +152,8 @@ pub struct Sink { _priv: () }
/// ```rust
/// use std::io::{self, Write};
///
/// let mut buffer = vec![1, 2, 3, 5, 8];
/// let num_bytes = io::sink().write(&mut buffer).unwrap();
/// let buffer = vec![1, 2, 3, 5, 8];
/// let num_bytes = io::sink().write(&buffer).unwrap();
/// assert_eq!(num_bytes, 5);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]