mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
Update Tokio to Rust 2018 (#1082)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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.
|
||||
///
|
||||
|
||||
@@ -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.
|
||||
///
|
||||
|
||||
@@ -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.
|
||||
///
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user