doc: forward-port the conditions tutorial + fixup libstd example

This commit is contained in:
Adrien Tétar 2013-12-15 16:19:13 +01:00
parent 386b455b1b
commit bf5f2f2631
3 changed files with 153 additions and 173 deletions

View file

@ -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