Skip to content

Commit

Permalink
Add a comment to Read::read_buf
Browse files Browse the repository at this point in the history
  • Loading branch information
a1phyr committed Sep 23, 2024
1 parent 4a11249 commit 57557c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions std/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,8 @@ pub trait Read {
/// with uninitialized buffers. The new data will be appended to any existing contents of `buf`.
///
/// The default implementation delegates to `read`.
///
/// This method makes it possible to return both data and an error but it is advised against.
#[unstable(feature = "read_buf", issue = "78485")]
fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<()> {
default_read_buf(|b| self.read(b), buf)
Expand Down

0 comments on commit 57557c9

Please sign in to comment.