diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index ca15aa2d56c..a058337a50a 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -182,11 +182,10 @@ //! //! # 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); -//! println!("{}", line); +//! println!("{}", try!(line)); //! } //! //! # Ok(())