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
+3 -4
View File
@@ -44,13 +44,12 @@
//! [up]: trait.Unpark.html
//! [mio]: https://docs.rs/mio/0.6/mio/struct.Poll.html
use crossbeam_utils::sync::{Parker, Unparker};
use std::marker::PhantomData;
use std::rc::Rc;
use std::sync::Arc;
use std::time::Duration;
use crossbeam_utils::sync::{Parker, Unparker};
/// Block the current thread.
///
/// See [module documentation][mod] for more details.
@@ -128,13 +127,13 @@ pub trait Unpark: Sync + Send + 'static {
fn unpark(&self);
}
impl Unpark for Box<Unpark> {
impl Unpark for Box<dyn Unpark> {
fn unpark(&self) {
(**self).unpark()
}
}
impl Unpark for Arc<Unpark> {
impl Unpark for Arc<dyn Unpark> {
fn unpark(&self) {
(**self).unpark()
}