diff options
Diffstat (limited to 'tokio-futures/src/io/flush.rs')
-rw-r--r-- | tokio-futures/src/io/flush.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tokio-futures/src/io/flush.rs b/tokio-futures/src/io/flush.rs index 4920581d..9984bf28 100644 --- a/tokio-futures/src/io/flush.rs +++ b/tokio-futures/src/io/flush.rs @@ -1,13 +1,12 @@ -use tokio_io::AsyncWrite; - use std::future::Future; use std::io; use std::pin::Pin; use std::task::{Context, Poll}; +use tokio_io::AsyncWrite; /// A future used to fully flush an I/O object. #[derive(Debug)] -pub struct Flush<'a, T: ?Sized + 'a> { +pub struct Flush<'a, T: ?Sized> { writer: &'a mut T, } @@ -23,7 +22,7 @@ impl<'a, T: AsyncWrite + ?Sized> Flush<'a, T> { impl<'a, T: AsyncWrite + ?Sized> Future for Flush<'a, T> { type Output = io::Result<()>; - 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; convert_poll(self.writer.poll_flush()) } |