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
+6 -7
View File
@@ -3,13 +3,12 @@
//! # Example
//!
//! ```
//! # #[macro_use] extern crate tokio_test;
//! # extern crate futures;
//! # extern crate tokio_timer;
//! # use tokio_test::clock;
//! # use tokio_timer::Delay;
//! # use std::time::Duration;
//! # use futures::Future;
//! use tokio_test::clock;
//! use tokio_test::{assert_ready, assert_not_ready};
//! use tokio_timer::Delay;
//! use std::time::Duration;
//! use futures::Future;
//!
//! clock::mock(|handle| {
//! let mut delay = Delay::new(handle.now() + Duration::from_secs(1));
//!
+9 -7
View File
@@ -1,23 +1,25 @@
#![doc(html_root_url = "https://docs.rs/tokio-test/0.1.0")]
#![deny(missing_docs, missing_debug_implementations, unreachable_pub)]
#![deny(
missing_docs,
missing_debug_implementations,
unreachable_pub,
rust_2018_idioms
)]
#![cfg_attr(test, deny(warnings))]
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
//! Tokio and Futures based testing utilites
//!
//! # Example
//!
//! ```
//! # extern crate futures;
//! # #[macro_use] extern crate tokio_test;
//! # use futures::{Future, future};
//! use tokio_test::assert_ready;
//!
//! let mut fut = future::ok::<(), ()>(());
//! assert_ready!(fut.poll());
//! ```
extern crate futures;
extern crate tokio_executor;
extern crate tokio_timer;
pub mod clock;
mod macros;
pub mod task;
+1 -3
View File
@@ -6,8 +6,7 @@
//! poll.
//!
//! ```
//! # #[macro_use] extern crate tokio_test;
//! # extern crate futures;
//! # use tokio_test::assert_ready_eq;
//! # use tokio_test::task::MockTask;
//! # use futures::{sync::mpsc, Stream, Sink, Future, Async};
//! let mut task = MockTask::new();
@@ -20,7 +19,6 @@
use futures::executor::{spawn, Notify};
use futures::{future, Async};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, Condvar, Mutex};