mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-24 00:00:11 +02: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:
committed by
Alex Crichton
parent
31f8cb9467
commit
0b54557796
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user