Skip to content

Commit

Permalink
Docs: Explain why/when .lines() returns an error
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Dec 21, 2016
1 parent 94ae2a2 commit 24334a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libstd/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1425,6 +1425,12 @@ pub trait BufRead: Read {
/// println!("{}", line.unwrap());
/// }
/// ```
///
/// # Errors
///
/// Each line of the iterator has the same error semantics as [`BufRead::read_line()`].
///
/// [`BufRead::read_line()`]: trait.BufRead.html#method.read_line
#[stable(feature = "rust1", since = "1.0.0")]
fn lines(self) -> Lines<Self> where Self: Sized {
Lines { buf: self }
Expand Down

0 comments on commit 24334a0

Please sign in to comment.