From 073a1a251ad1e2ddff9b418799306dafee7d417c Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 7 Sep 2016 22:15:13 -0700 Subject: [PATCH] process: Track tokio-core master --- src/lib.rs | 8 ++++---- tests/smoke.rs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 61523c517..b8b44d46c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,7 @@ use std::path::Path; use std::process::{self, ExitStatus}; use futures::{Future, Poll}; -use tokio_core::LoopHandle; +use tokio_core::reactor::Handle; #[path = "unix.rs"] #[cfg(unix)] @@ -21,7 +21,7 @@ mod imp; pub struct Command { inner: process::Command, #[allow(dead_code)] - handle: LoopHandle, + handle: Handle, } pub struct Spawn { @@ -33,11 +33,11 @@ pub struct Child { } impl Command { - pub fn new>(exe: T, handle: &LoopHandle) -> Command { + pub fn new>(exe: T, handle: &Handle) -> Command { Command::_new(exe.as_ref(), handle) } - fn _new(exe: &OsStr, handle: &LoopHandle) -> Command { + fn _new(exe: &OsStr, handle: &Handle) -> Command { Command { inner: process::Command::new(exe), handle: handle.clone(), diff --git a/tests/smoke.rs b/tests/smoke.rs index 8d5fd011f..9e6949d74 100644 --- a/tests/smoke.rs +++ b/tests/smoke.rs @@ -7,7 +7,7 @@ use std::sync::mpsc::channel; use std::sync::{Once, ONCE_INIT}; use std::thread; -use tokio_core::{Loop, LoopHandle}; +use tokio_core::reactor::{Core, Handle}; use tokio_process::Command; static INIT: Once = ONCE_INIT; @@ -16,7 +16,7 @@ fn init() { INIT.call_once(|| { let (tx, rx) = channel(); thread::spawn(move || { - let mut lp = Loop::new().unwrap(); + let mut lp = Core::new().unwrap(); let cmd = exit(&lp.handle()); let mut child = lp.run(cmd.spawn()).unwrap(); drop(child.kill()); @@ -28,7 +28,7 @@ fn init() { }); } -fn exit(handle: &LoopHandle) -> Command { +fn exit(handle: &Handle) -> Command { let mut me = env::current_exe().unwrap(); me.pop(); me.push("exit"); @@ -39,7 +39,7 @@ fn exit(handle: &LoopHandle) -> Command { fn simple() { init(); - let mut lp = Loop::new().unwrap(); + let mut lp = Core::new().unwrap(); let mut cmd = exit(&lp.handle()); cmd.arg("2"); let mut child = lp.run(cmd.spawn()).unwrap();