diff options
Diffstat (limited to 'tokio-futures/src/stream/next.rs')
-rw-r--r-- | tokio-futures/src/stream/next.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tokio-futures/src/stream/next.rs b/tokio-futures/src/stream/next.rs index 7cd4eafa..ab56fd87 100644 --- a/tokio-futures/src/stream/next.rs +++ b/tokio-futures/src/stream/next.rs @@ -1,12 +1,11 @@ use futures::Stream; - use std::future::Future; use std::pin::Pin; use std::task::{Context, Poll}; /// A future of the next element of a stream. #[derive(Debug)] -pub struct Next<'a, T: 'a> { +pub struct Next<'a, T> { stream: &'a mut T, } @@ -21,7 +20,7 @@ impl<'a, T: Stream + Unpin> Next<'a, T> { impl<'a, T: Stream + Unpin> Future for Next<'a, T> { type Output = Option<Result<T::Item, T::Error>>; - fn poll(mut self: Pin<&mut Self>, _context: &mut Context) -> Poll<Self::Output> { + fn poll(mut self: Pin<&mut Self>, _context: &mut Context<'_>) -> Poll<Self::Output> { use crate::compat::forward::convert_poll_stream; convert_poll_stream(self.stream.poll()) |