small doc fixes

We don't need this &mut, and vec could use []s
This commit is contained in:
Steve Klabnik 2014-11-27 14:31:54 -05:00
parent 930f87774d
commit 44abe92d66
1 changed files with 3 additions and 3 deletions

View File

@ -280,10 +280,10 @@ impl<'a> Seek for BufWriter<'a> {
/// # #![allow(unused_must_use)]
/// use std::io::BufReader;
///
/// let mut buf = [0, 1, 2, 3];
/// let mut r = BufReader::new(&mut buf);
/// let buf = [0, 1, 2, 3];
/// let mut r = BufReader::new(&buf);
///
/// assert_eq!(r.read_to_end().unwrap(), vec!(0, 1, 2, 3));
/// assert_eq!(r.read_to_end().unwrap(), vec![0, 1, 2, 3]);
/// ```
pub struct BufReader<'a> {
buf: &'a [u8],