about summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-12-20 12:41:33 -0800
committerbors <bors@rust-lang.org>2013-12-20 12:41:33 -0800
commitd5d5c5064b3f27918432484d27b88204df940209 (patch)
treeabab5412fffcbab50ecfd68d2b645a74bbe1d789 /src/libstd/io
parent810c4de6a4065163662aa21c50d5ed500550c8d0 (diff)
parentbf5f2f26314ba96752fef4718e5f211fe3f3923d (diff)
downloadrust-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.rs6
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