Skip to content

Commit 24334a0

Browse files
committed
Docs: Explain why/when .lines() returns an error
1 parent 94ae2a2 commit 24334a0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/libstd/io/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,6 +1425,12 @@ pub trait BufRead: Read {
14251425
/// println!("{}", line.unwrap());
14261426
/// }
14271427
/// ```
1428+
///
1429+
/// # Errors
1430+
///
1431+
/// Each line of the iterator has the same error semantics as [`BufRead::read_line()`].
1432+
///
1433+
/// [`BufRead::read_line()`]: trait.BufRead.html#method.read_line
14281434
#[stable(feature = "rust1", since = "1.0.0")]
14291435
fn lines(self) -> Lines<Self> where Self: Sized {
14301436
Lines { buf: self }

0 commit comments

Comments
 (0)