Skip to content

Commit ea299e8

Browse files
authored
Rollup merge of #99716 - sourcelliu:iomut, r=Mark-Simulacrum
remove useless mut from examples remove useless mut from examples
2 parents 811b4b8 + 7ada7c8 commit ea299e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/std/src/io/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ pub trait Read {
898898
/// use std::fs::File;
899899
///
900900
/// fn main() -> io::Result<()> {
901-
/// let mut f = File::open("foo.txt")?;
901+
/// let f = File::open("foo.txt")?;
902902
///
903903
/// for byte in f.bytes() {
904904
/// println!("{}", byte.unwrap());
@@ -932,8 +932,8 @@ pub trait Read {
932932
/// use std::fs::File;
933933
///
934934
/// fn main() -> io::Result<()> {
935-
/// let mut f1 = File::open("foo.txt")?;
936-
/// let mut f2 = File::open("bar.txt")?;
935+
/// let f1 = File::open("foo.txt")?;
936+
/// let f2 = File::open("bar.txt")?;
937937
///
938938
/// let mut handle = f1.chain(f2);
939939
/// let mut buffer = String::new();
@@ -973,7 +973,7 @@ pub trait Read {
973973
/// use std::fs::File;
974974
///
975975
/// fn main() -> io::Result<()> {
976-
/// let mut f = File::open("foo.txt")?;
976+
/// let f = File::open("foo.txt")?;
977977
/// let mut buffer = [0; 5];
978978
///
979979
/// // read at most five bytes

0 commit comments

Comments
 (0)