doc: forward-port the conditions tutorial + fixup libstd example
This commit is contained in:
parent
386b455b1b
commit
bf5f2f2631
3 changed files with 153 additions and 173 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue