From 72e8009185b537083015f43a8e0fd34509ab1938 Mon Sep 17 00:00:00 2001 From: Evan Cameron Date: Thu, 20 Jul 2017 13:59:44 -0400 Subject: [PATCH] Remove mut where possible --- src/libstd/io/buffered.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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 memchr; /// 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 @@ impl 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 @@ impl 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 @@ impl BufReader { /// 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 @@ impl 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.into_inner(); /// # Ok(())