diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 1b832453523..d765dd227be 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -37,7 +37,7 @@ /// use std::fs::File; /// /// # fn foo() -> std::io::Result<()> { -/// let mut f = File::open("log.txt")?; +/// let f = File::open("log.txt")?; /// let mut reader = BufReader::new(f); /// /// let mut line = String::new(); @@ -64,8 +64,8 @@ impl BufReader { /// use std::fs::File; /// /// # fn foo() -> std::io::Result<()> { - /// let mut f = File::open("log.txt")?; - /// let mut reader = BufReader::new(f); + /// let f = File::open("log.txt")?; + /// let reader = BufReader::new(f); /// # Ok(()) /// # } /// ``` @@ -85,8 +85,8 @@ pub fn new(inner: R) -> BufReader { /// use std::fs::File; /// /// # fn foo() -> std::io::Result<()> { - /// let mut f = File::open("log.txt")?; - /// let mut reader = BufReader::with_capacity(10, f); + /// let f = File::open("log.txt")?; + /// let reader = BufReader::with_capacity(10, f); /// # Ok(()) /// # } /// ``` @@ -116,8 +116,8 @@ pub fn with_capacity(cap: usize, inner: R) -> BufReader { /// use std::fs::File; /// /// # fn foo() -> std::io::Result<()> { - /// let mut f1 = File::open("log.txt")?; - /// let mut reader = BufReader::new(f1); + /// let f1 = File::open("log.txt")?; + /// let reader = BufReader::new(f1); /// /// let f2 = reader.get_ref(); /// # Ok(()) @@ -137,7 +137,7 @@ pub fn get_ref(&self) -> &R { &self.inner } /// use std::fs::File; /// /// # fn foo() -> std::io::Result<()> { - /// let mut f1 = File::open("log.txt")?; + /// let f1 = File::open("log.txt")?; /// let mut reader = BufReader::new(f1); /// /// let f2 = reader.get_mut(); @@ -158,8 +158,8 @@ pub fn get_mut(&mut self) -> &mut R { &mut self.inner } /// use std::fs::File; /// /// # fn foo() -> std::io::Result<()> { - /// let mut f1 = File::open("log.txt")?; - /// let mut reader = BufReader::new(f1); + /// let f1 = File::open("log.txt")?; + /// let reader = BufReader::new(f1); /// /// let f2 = reader.into_inner(); /// # Ok(())