diff options
| author | bors <bors@rust-lang.org> | 2013-12-20 12:41:33 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-12-20 12:41:33 -0800 |
| commit | d5d5c5064b3f27918432484d27b88204df940209 (patch) | |
| tree | abab5412fffcbab50ecfd68d2b645a74bbe1d789 /src/libstd/io | |
| parent | 810c4de6a4065163662aa21c50d5ed500550c8d0 (diff) | |
| parent | bf5f2f26314ba96752fef4718e5f211fe3f3923d (diff) | |
| download | rust-d5d5c5064b3f27918432484d27b88204df940209.tar.gz rust-d5d5c5064b3f27918432484d27b88204df940209.zip | |
auto merge of #10986 : adridu59/rust/patch-new, r=alexcrichton
Thanks to @huonw for some mentoring. :cake:
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 239c6bc6a08..537b5de1b4a 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -476,9 +476,9 @@ pub trait Reader { /// /// # Example /// - /// let reader = File::open(&Path::new("foo.txt")) - /// while !reader.eof() { - /// println(reader.read_line()); + /// let mut reader = BufferedReader::new(File::open(&Path::new("foo.txt"))); + /// for line in reader.lines() { + /// println(line); /// } /// /// # Failure |
