Skip to content

Commit ab0a4cb

Browse files
committed
remove pin<self> bounds from consume
Signed-off-by: Yoshua Wuyts <[email protected]>
1 parent 8fe7347 commit ab0a4cb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/io/buf_read/mod.rs

+9
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ pub trait BufRead {
6363
FillBufFuture::new(self)
6464
}
6565

66+
/// Tells this buffer that `amt` bytes have been consumed from the buffer, so they should no
67+
/// longer be returned in calls to `read`.
68+
fn consume(&mut self, amt: usize)
69+
where
70+
Self: AsyncBufRead + Unpin,
71+
{
72+
AsyncBufRead::consume(Pin::new(self), amt)
73+
}
74+
6675
/// Reads all bytes into `buf` until the delimiter `byte` or EOF is reached.
6776
///
6877
/// This function will read bytes from the underlying stream until the delimiter or EOF is

0 commit comments

Comments
 (0)