diff options
| author | Tobias Bucher <tobiasbucher5991@gmail.com> | 2017-10-31 11:04:08 +0100 |
|---|---|---|
| committer | Tobias Bucher <tobiasbucher5991@gmail.com> | 2017-10-31 11:04:08 +0100 |
| commit | 66268e8a8ddcbfdaf14abf4b584ac8241e23cad1 (patch) | |
| tree | 91364e4c0a8a4f166ff81b2ea7f3e4237e398f76 /src/libstd | |
| parent | 6713736275181abb3304730603afd785b0470ae3 (diff) | |
| download | rust-66268e8a8ddcbfdaf14abf4b584ac8241e23cad1.tar.gz rust-66268e8a8ddcbfdaf14abf4b584ac8241e23cad1.zip | |
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 |
