Update Tokio to Rust 2018 (#1082)

This commit is contained in:
Carl Lerche
2019-05-14 10:27:36 -07:00
committed by GitHub
parent 79d8820050
commit cb4aea394e
343 changed files with 1725 additions and 2813 deletions
+2 -4
View File
@@ -1,9 +1,7 @@
use crate::{AsyncRead, AsyncWrite};
use futures::{try_ready, Future, Poll};
use std::io;
use futures::{Future, Poll};
use {AsyncRead, AsyncWrite};
/// A future which will copy all data from a reader into a writer.
///
/// Created by the [`copy`] function, this future will resolve to the number of
+2 -4
View File
@@ -1,9 +1,7 @@
use crate::AsyncWrite;
use futures::{try_ready, Async, Future, Poll};
use std::io;
use futures::{Async, Future, Poll};
use AsyncWrite;
/// A future used to fully flush an I/O object.
///
/// Resolves to the underlying I/O object once the flush operation is complete.
+4 -4
View File
@@ -26,7 +26,7 @@ pub use self::read_to_end::{read_to_end, ReadToEnd};
pub use self::read_until::{read_until, ReadUntil};
pub use self::shutdown::{shutdown, Shutdown};
pub use self::write_all::{write_all, WriteAll};
pub use allow_std::AllowStdIo;
pub use lines::{lines, Lines};
pub use split::{ReadHalf, WriteHalf};
pub use window::Window;
pub use crate::allow_std::AllowStdIo;
pub use crate::lines::{lines, Lines};
pub use crate::split::{ReadHalf, WriteHalf};
pub use crate::window::Window;
+2 -4
View File
@@ -1,10 +1,8 @@
use crate::AsyncRead;
use futures::{try_ready, Future, Poll};
use std::io;
use std::mem;
use futures::{Future, Poll};
use AsyncRead;
#[derive(Debug)]
enum State<R, T> {
Pending { rd: R, buf: T },
+2 -4
View File
@@ -1,10 +1,8 @@
use crate::AsyncRead;
use futures::{try_ready, Future, Poll};
use std::io;
use std::mem;
use futures::{Future, Poll};
use AsyncRead;
/// A future which can be used to easily read exactly enough bytes to fill
/// a buffer.
///
+2 -4
View File
@@ -1,10 +1,8 @@
use crate::AsyncRead;
use futures::{Future, Poll};
use std::io;
use std::mem;
use futures::{Future, Poll};
use AsyncRead;
/// A future which can be used to easily read the entire contents of a stream
/// into a vector.
///
+2 -4
View File
@@ -1,10 +1,8 @@
use crate::AsyncRead;
use futures::{Future, Poll};
use std::io::{self, BufRead};
use std::mem;
use futures::{Future, Poll};
use AsyncRead;
/// A future which can be used to easily read the contents of a stream into a
/// vector until the delimiter is reached.
///
+2 -4
View File
@@ -1,9 +1,7 @@
use crate::AsyncWrite;
use futures::{try_ready, Async, Future, Poll};
use std::io;
use futures::{Async, Future, Poll};
use AsyncWrite;
/// A future used to fully shutdown an I/O object.
///
/// Resolves to the underlying I/O object once the shutdown operation is
+2 -4
View File
@@ -1,10 +1,8 @@
use crate::AsyncWrite;
use futures::{try_ready, Future, Poll};
use std::io;
use std::mem;
use futures::{Future, Poll};
use AsyncWrite;
/// A future used to write the entire contents of some data to a stream.
///
/// This is created by the [`write_all`] top-level method.