remove pin<self> bounds from consume

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
staging
Yoshua Wuyts 5 years ago
parent 8fe7347771
commit ab0a4cb966
No known key found for this signature in database
GPG Key ID: 24EA8164F96777ED

@ -63,6 +63,15 @@ pub trait BufRead {
FillBufFuture::new(self)
}
/// Tells this buffer that `amt` bytes have been consumed from the buffer, so they should no
/// longer be returned in calls to `read`.
fn consume(&mut self, amt: usize)
where
Self: AsyncBufRead + Unpin,
{
AsyncBufRead::consume(Pin::new(self), amt)
}
/// Reads all bytes into `buf` until the delimiter `byte` or EOF is reached.
///
/// This function will read bytes from the underlying stream until the delimiter or EOF is

Loading…
Cancel
Save