diff --git a/examples/echo-udp.rs b/examples/echo-udp.rs index 9c6c9e279..631712070 100644 --- a/examples/echo-udp.rs +++ b/examples/echo-udp.rs @@ -11,7 +11,6 @@ //! Each line you type in to the `nc` terminal should be echo'd back to you! extern crate futures; -#[macro_use] extern crate tokio; #[macro_use] extern crate tokio_io; diff --git a/src/lib.rs b/src/lib.rs index fff2c0616..0cfb92d98 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -86,7 +86,6 @@ #![doc(html_root_url = "https://docs.rs/tokio-core/0.1")] #![deny(missing_docs)] #![deny(warnings)] -#![allow(unused_macros)] extern crate bytes; #[macro_use] diff --git a/src/reactor/mod.rs b/src/reactor/mod.rs index 694e1d3c7..ae4eb0168 100644 --- a/src/reactor/mod.rs +++ b/src/reactor/mod.rs @@ -360,16 +360,6 @@ impl Notify for MySetReadiness { } } -trait FnBox: Send + 'static { - fn call_box(self: Box, lp: &Core); -} - -impl FnBox for F { - fn call_box(self: Box, lp: &Core) { - (*self)(lp) - } -} - fn read_ready() -> mio::Ready { mio::Ready::readable() | platform::hup() } diff --git a/src/reactor/poll_evented.rs b/src/reactor/poll_evented.rs index aa19803f0..5b23cf2e2 100644 --- a/src/reactor/poll_evented.rs +++ b/src/reactor/poll_evented.rs @@ -69,7 +69,7 @@ pub struct PollEvented { io: E, } -impl fmt::Debug for PollEvented { +impl fmt::Debug for PollEvented { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("PollEvented") .field("io", &self.io) @@ -111,8 +111,7 @@ impl PollEvented { None => return Ok(()), }; - let ret = inner.deregister_source(&self.io); - return ret + inner.deregister_source(&self.io) } } diff --git a/tests/udp.rs b/tests/udp.rs index e22af9347..4cc552ff2 100644 --- a/tests/udp.rs +++ b/tests/udp.rs @@ -1,5 +1,4 @@ extern crate futures; -#[macro_use] extern crate tokio; #[macro_use] extern crate tokio_io;