Skip to content

Commit

Permalink
Remove mut where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Cameron committed Jul 20, 2017
1 parent ae98ebf commit 72e8009
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/libstd/io/buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -64,8 +64,8 @@ impl<R: Read> BufReader<R> {
/// 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(())
/// # }
/// ```
Expand All @@ -85,8 +85,8 @@ impl<R: Read> BufReader<R> {
/// 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(())
/// # }
/// ```
Expand Down Expand Up @@ -116,8 +116,8 @@ impl<R: Read> BufReader<R> {
/// 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(())
Expand All @@ -137,7 +137,7 @@ impl<R: Read> BufReader<R> {
/// 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();
Expand All @@ -158,8 +158,8 @@ impl<R: Read> BufReader<R> {
/// 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(())
Expand Down

0 comments on commit 72e8009

Please sign in to comment.