Skip to content

Commit 48ea71b

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

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/io/buf_read/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ cfg_if! {
4343
pub trait BufRead {
4444
/// Tells this buffer that `amt` bytes have been consumed from the buffer, so they should no
4545
/// longer be returned in calls to `read`.
46-
fn consume(self: Pin<&mut Self>, amt: usize)
46+
fn consume(&mut self, amt: usize)
4747
where
48-
Self: AsyncBufRead,
48+
Self: AsyncBufRead + Unpin,
4949
{
50-
AsyncBufRead::consume(self, amt)
50+
AsyncBufRead::consume(Pin::new(self), amt)
5151
}
5252

5353
/// Reads all bytes into `buf` until the delimiter `byte` or EOF is reached.

0 commit comments

Comments
 (0)