diff --git a/Cargo.toml b/Cargo.toml index 09014021c..a2b8997c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,6 @@ codecov = { repository = "alexcrichton/tokio-process" } [dependencies] futures = "0.1.11" -mio = "0.6.5" tokio-io = "0.1" tokio-reactor = "0.1" @@ -53,4 +52,5 @@ features = [ [target.'cfg(unix)'.dependencies] libc = "0.2" +mio = "0.6.5" tokio-signal = "0.2.5" diff --git a/src/lib.rs b/src/lib.rs index 26e60ec16..ec42c7ca2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -161,7 +161,6 @@ extern crate futures; extern crate tokio_io; extern crate tokio_reactor; -extern crate mio; use std::io::{self, Read, Write}; use std::process::{Command, ExitStatus, Output, Stdio}; diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 6ceeaaeda..6b023de3d 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -22,17 +22,16 @@ //! bad in theory... extern crate libc; +extern crate mio; extern crate tokio_signal; mod reap; use futures::future::FlattenStream; use futures::{Future, Poll}; -use mio::unix::{EventedFd, UnixReady}; -use mio::{PollOpt, Ready, Token}; -use mio::event::Evented; -use mio; -use self::reap::{Kill, Reaper, Wait}; +use self::mio::{Poll as MioPoll, PollOpt, Ready, Token}; +use self::mio::unix::{EventedFd, UnixReady}; +use self::mio::event::Evented; use self::tokio_signal::unix::Signal; use std::fmt; use std::io; @@ -130,7 +129,7 @@ pub type ChildStderr = PollEvented>; impl Evented for Fd where T: AsRawFd { fn register(&self, - poll: &mio::Poll, + poll: &MioPoll, token: Token, interest: Ready, opts: PollOpt) @@ -142,7 +141,7 @@ impl Evented for Fd where T: AsRawFd { } fn reregister(&self, - poll: &mio::Poll, + poll: &MioPoll, token: Token, interest: Ready, opts: PollOpt) @@ -153,7 +152,7 @@ impl Evented for Fd where T: AsRawFd { opts) } - fn deregister(&self, poll: &mio::Poll) -> io::Result<()> { + fn deregister(&self, poll: &MioPoll) -> io::Result<()> { EventedFd(&self.as_raw_fd()).deregister(poll) } }