diff --git a/futures-io/src/lib.rs b/futures-io/src/lib.rs index 45899985f8..b5fcdd4990 100644 --- a/futures-io/src/lib.rs +++ b/futures-io/src/lib.rs @@ -138,13 +138,13 @@ mod if_std { /// `Interrupted`. Implementations must convert `WouldBlock` into /// `Poll::Pending` and either internally retry or convert /// `Interrupted` into another error kind. - fn poll_read_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &mut [IoSliceMut<'_>]) + fn poll_read_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>]) -> Poll> { - if let Some(ref mut first_iovec) = vec.get_mut(0) { + if let Some(ref mut first_iovec) = bufs.get_mut(0) { self.poll_read(cx, first_iovec) } else { - // `vec` is empty. + // `bufs` is empty. Poll::Ready(Ok(0)) } } @@ -346,10 +346,10 @@ mod if_std { Pin::new(&mut **self).poll_read(cx, buf) } - fn poll_read_vectored(mut self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &mut [IoSliceMut<'_>]) + fn poll_read_vectored(mut self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>]) -> Poll> { - Pin::new(&mut **self).poll_read_vectored(cx, vec) + Pin::new(&mut **self).poll_read_vectored(cx, bufs) } } } @@ -377,10 +377,10 @@ mod if_std { Pin::get_mut(self).as_mut().poll_read(cx, buf) } - fn poll_read_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &mut [IoSliceMut<'_>]) + fn poll_read_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>]) -> Poll> { - Pin::get_mut(self).as_mut().poll_read_vectored(cx, vec) + Pin::get_mut(self).as_mut().poll_read_vectored(cx, bufs) } } @@ -398,10 +398,10 @@ mod if_std { Poll::Ready(StdIo::Read::read(&mut *self, buf)) } - fn poll_read_vectored(mut self: Pin<&mut Self>, _: &mut Context<'_>, vec: &mut [IoSliceMut<'_>]) + fn poll_read_vectored(mut self: Pin<&mut Self>, _: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>]) -> Poll> { - Poll::Ready(StdIo::Read::read_vectored(&mut *self, vec)) + Poll::Ready(StdIo::Read::read_vectored(&mut *self, bufs)) } } } diff --git a/futures-util/src/io/split.rs b/futures-util/src/io/split.rs index bc47e4a98b..6f1def762b 100644 --- a/futures-util/src/io/split.rs +++ b/futures-util/src/io/split.rs @@ -43,10 +43,10 @@ impl AsyncRead for ReadHalf { lock_and_then(&self.handle, cx, |l, cx| l.poll_read(cx, buf)) } - fn poll_read_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &mut [IoSliceMut<'_>]) + fn poll_read_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>]) -> Poll> { - lock_and_then(&self.handle, cx, |l, cx| l.poll_read_vectored(cx, vec)) + lock_and_then(&self.handle, cx, |l, cx| l.poll_read_vectored(cx, bufs)) } }