mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
Remove unused code (#44)
* remove unused #[macro_use] and #[allow(unused_macros)] * remove unused FnBox trait * remove unused temporary variable * remove Evented trait requirement to implement Debug
This commit is contained in:
parent
31f8cb9467
commit
0b54557796
@ -11,7 +11,6 @@
|
|||||||
//! Each line you type in to the `nc` terminal should be echo'd back to you!
|
//! Each line you type in to the `nc` terminal should be echo'd back to you!
|
||||||
|
|
||||||
extern crate futures;
|
extern crate futures;
|
||||||
#[macro_use]
|
|
||||||
extern crate tokio;
|
extern crate tokio;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate tokio_io;
|
extern crate tokio_io;
|
||||||
|
@ -86,7 +86,6 @@
|
|||||||
#![doc(html_root_url = "https://docs.rs/tokio-core/0.1")]
|
#![doc(html_root_url = "https://docs.rs/tokio-core/0.1")]
|
||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
#![deny(warnings)]
|
#![deny(warnings)]
|
||||||
#![allow(unused_macros)]
|
|
||||||
|
|
||||||
extern crate bytes;
|
extern crate bytes;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
@ -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 {
|
fn read_ready() -> mio::Ready {
|
||||||
mio::Ready::readable() | platform::hup()
|
mio::Ready::readable() | platform::hup()
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ pub struct PollEvented<E> {
|
|||||||
io: 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 {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
f.debug_struct("PollEvented")
|
f.debug_struct("PollEvented")
|
||||||
.field("io", &self.io)
|
.field("io", &self.io)
|
||||||
@ -111,8 +111,7 @@ impl<E: Evented> PollEvented<E> {
|
|||||||
None => return Ok(()),
|
None => return Ok(()),
|
||||||
};
|
};
|
||||||
|
|
||||||
let ret = inner.deregister_source(&self.io);
|
inner.deregister_source(&self.io)
|
||||||
return ret
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
extern crate futures;
|
extern crate futures;
|
||||||
#[macro_use]
|
|
||||||
extern crate tokio;
|
extern crate tokio;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate tokio_io;
|
extern crate tokio_io;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user