summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/echo-udp.rs1
-rw-r--r--src/lib.rs1
-rw-r--r--src/reactor/mod.rs10
-rw-r--r--src/reactor/poll_evented.rs5
-rw-r--r--tests/udp.rs1
5 files changed, 2 insertions, 16 deletions
diff --git a/examples/echo-udp.rs b/examples/echo-udp.rs
index 9c6c9e27..63171207 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 fff2c061..0cfb92d9 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 694e1d3c..ae4eb016 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<Self>, lp: &Core);
-}
-
-impl<F: FnOnce(&Core) + Send + 'static> FnBox for F {
- fn call_box(self: Box<Self>, 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 aa19803f..5b23cf2e 100644
--- a/src/reactor/poll_evented.rs
+++ b/src/reactor/poll_evented.rs
@@ -69,7 +69,7 @@ pub struct PollEvented<E> {
io: E,
}
-impl<E: Evented + fmt::Debug> fmt::Debug for PollEvented<E> {
+impl<E: fmt::Debug> fmt::Debug for PollEvented<E> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("PollEvented")
.field("io", &self.io)
@@ -111,8 +111,7 @@ impl<E: Evented> PollEvented<E> {
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 e22af934..4cc552ff 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;