1
Fork 0

Add a comment to Read::read_buf

This commit is contained in:
Benoît du Garreau 2024-09-23 17:40:04 +02:00
parent 4b8a66c908
commit d77664bed9

View file

@ -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)