summaryrefslogtreecommitdiffstats
path: root/tokio-futures/src/io/read_exact.rs
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2019-05-14 10:27:36 -0700
committerGitHub <noreply@github.com>2019-05-14 10:27:36 -0700
commitcb4aea394e6851ae8cc45a68beeaf2c93cc9a0c0 (patch)
tree2158eab230c8717d3b35717e50f14fda6ca0edf1 /tokio-futures/src/io/read_exact.rs
parent79d88200500f6e6c9970e1ad26469276c1a2f71f (diff)
Update Tokio to Rust 2018 (#1082)
Diffstat (limited to 'tokio-futures/src/io/read_exact.rs')
-rw-r--r--tokio-futures/src/io/read_exact.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/tokio-futures/src/io/read_exact.rs b/tokio-futures/src/io/read_exact.rs
index 931fc4ca..82344bea 100644
--- a/tokio-futures/src/io/read_exact.rs
+++ b/tokio-futures/src/io/read_exact.rs
@@ -1,15 +1,13 @@
-use tokio_io::AsyncRead;
-
use std::future::Future;
-use std::task::{self, Poll};
-
use std::io;
use std::mem;
use std::pin::Pin;
+use std::task::{self, Poll};
+use tokio_io::AsyncRead;
/// A future which can be used to read exactly enough bytes to fill a buffer.
#[derive(Debug)]
-pub struct ReadExact<'a, T: ?Sized + 'a> {
+pub struct ReadExact<'a, T: ?Sized> {
reader: &'a mut T,
buf: &'a mut [u8],
}
@@ -30,7 +28,7 @@ fn eof() -> io::Error {
impl<'a, T: AsyncRead + ?Sized> Future for ReadExact<'a, T> {
type Output = io::Result<()>;
- fn poll(mut self: Pin<&mut Self>, _context: &mut task::Context) -> Poll<Self::Output> {
+ fn poll(mut self: Pin<&mut Self>, _context: &mut task::Context<'_>) -> Poll<Self::Output> {
use crate::compat::forward::convert_poll;
let this = &mut *self;