Skip to content

Commit 57b4658

Browse files
authored
Rollup merge of rust-lang#45649 - tbu-:pr_doc_bufread_eof, r=estebank
Add a hint what `BufRead` functions do on EOF
2 parents e9b5c86 + 66268e8 commit 57b4658

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libstd/io/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,6 +1410,8 @@ pub trait BufRead: Read {
14101410
///
14111411
/// If successful, this function will return the total number of bytes read.
14121412
///
1413+
/// An empty buffer returned indicates that the stream has reached EOF.
1414+
///
14131415
/// # Errors
14141416
///
14151417
/// This function will ignore all instances of [`ErrorKind::Interrupted`] and
@@ -1470,6 +1472,8 @@ pub trait BufRead: Read {
14701472
///
14711473
/// If successful, this function will return the total number of bytes read.
14721474
///
1475+
/// An empty buffer returned indicates that the stream has reached EOF.
1476+
///
14731477
/// # Errors
14741478
///
14751479
/// This function has the same error semantics as [`read_until`] and will

0 commit comments

Comments
 (0)