diff options
| author | kennytm <kennytm@gmail.com> | 2017-11-01 13:32:16 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-01 13:32:16 +0800 |
| commit | 57b4658a2bd6cbd4deb48f0dd627f8ff2878091f (patch) | |
| tree | 42e638e6f54b6fe73af517da58cd8676aefa6b7a /src/libstd | |
| parent | e9b5c86c03617d8fdfef4dd681418748931acc9a (diff) | |
| parent | 66268e8a8ddcbfdaf14abf4b584ac8241e23cad1 (diff) | |
| download | rust-57b4658a2bd6cbd4deb48f0dd627f8ff2878091f.tar.gz rust-57b4658a2bd6cbd4deb48f0dd627f8ff2878091f.zip | |
Rollup merge of #45649 - tbu-:pr_doc_bufread_eof, r=estebank
Add a hint what `BufRead` functions do on EOF
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 074ab3ebd8f..e262257077b 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -1410,6 +1410,8 @@ pub trait BufRead: Read { /// /// If successful, this function will return the total number of bytes read. /// + /// An empty buffer returned indicates that the stream has reached EOF. + /// /// # Errors /// /// This function will ignore all instances of [`ErrorKind::Interrupted`] and @@ -1470,6 +1472,8 @@ pub trait BufRead: Read { /// /// If successful, this function will return the total number of bytes read. /// + /// An empty buffer returned indicates that the stream has reached EOF. + /// /// # Errors /// /// This function has the same error semantics as [`read_until`] and will |
