diff options
| author | Marijn Schouten <hkBst@users.noreply.github.com> | 2025-03-18 11:16:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-18 11:16:18 +0100 |
| commit | e5b86e2c73f0c3f09e70dfaa7bfed778585574bf (patch) | |
| tree | 94db4608e099fbe4d5563923a8cac8ef0ba763ce | |
| parent | 51c5700f15a23ac55c51e8e6a3f478a7fd77fcc6 (diff) | |
| download | rust-e5b86e2c73f0c3f09e70dfaa7bfed778585574bf.tar.gz rust-e5b86e2c73f0c3f09e70dfaa7bfed778585574bf.zip | |
Apply suggestions from code review
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
| -rw-r--r-- | library/std/src/io/mod.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index 767e6e18cca..a78ce7031d3 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -2250,18 +2250,18 @@ fn skip_until<R: BufRead + ?Sized>(r: &mut R, delim: u8) -> Result<usize> { /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub trait BufRead: Read { - /// Returns the contents of the internal buffer, filling it with more data, via Read methods, if empty. + /// Returns the contents of the internal buffer, filling it with more data, via `Read` methods, if empty. /// /// This is a lower-level method and is meant to be used together with [`consume`], /// which can be used to mark bytes that should not be returned by subsequent calls to `read`. /// /// [`consume`]: BufRead::consume /// - /// Returns an empty buffer to indicate that the stream has reached EOF. + /// Returns an empty buffer when the stream has reached EOF. /// /// # Errors /// - /// Passes on I/O errors from Read. + /// This function will return an I/O error if a `Read` method was called, but returned an error. /// /// # Examples /// @@ -2288,12 +2288,12 @@ pub trait BufRead: Read { fn fill_buf(&mut self) -> Result<&[u8]>; /// Marks the given `amount` of additional bytes from the internal buffer as having been read. - /// Subsequent calls to `read` return bytes that have not yet been so marked. + /// Subsequent calls to `read` only return bytes that have not been marked as read. /// /// This is a lower-level method and is meant to be used together with [`fill_buf`], - /// which can be used to fill the internal buffer via Read methods. + /// which can be used to fill the internal buffer via `Read` methods. /// - /// It is a logic error if `amount` exceeds the number of unread bytes in the internal buffer. + /// It is a logic error if `amount` exceeds the number of unread bytes in the internal buffer, which is returned by [`fill_buf`]. /// /// # Examples /// @@ -2315,7 +2315,7 @@ pub trait BufRead: Read { /// /// # Errors /// - /// Passes on I/O errors from Read. + /// This function will return an I/O error if a `Read` method was called, but returned an error. /// /// Examples /// |
