From 8e9008dc307f97f596add6cbb27d3b1ca1b88d4a Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 5 May 2016 23:55:08 +0200 Subject: [PATCH 1/2] doc: mut not needed --- src/libstd/io/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index ca15aa2d56c..46c6a23d8d4 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -182,7 +182,7 @@ //! //! # fn foo() -> io::Result<()> { //! let f = try!(File::open("foo.txt")); -//! let mut reader = BufReader::new(f); +//! let reader = BufReader::new(f); //! //! for line in reader.lines() { //! let line = try!(line); From 9f935c8dd891ec6eb0809b8438656d1b39c2e2f5 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 5 May 2016 23:55:36 +0200 Subject: [PATCH 2/2] doc: binding not needed --- src/libstd/io/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 46c6a23d8d4..a058337a50a 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -185,8 +185,7 @@ //! let reader = BufReader::new(f); //! //! for line in reader.lines() { -//! let line = try!(line); -//! println!("{}", line); +//! println!("{}", try!(line)); //! } //! //! # Ok(())