From 7b3e4b98ac1f11dd28524edb0179152578b642f6 Mon Sep 17 00:00:00 2001 From: Ivan Petkov Date: Mon, 14 May 2018 19:54:38 -0700 Subject: [PATCH] process: Update Child::forget example to use the tokio runtime --- src/lib.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 611cd88a3..8d5f1722f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -436,27 +436,23 @@ impl Child { /// /// ```no_run /// # extern crate futures; - /// # extern crate tokio_core; + /// # extern crate tokio; /// # extern crate tokio_process; /// # /// # use std::process::Command; /// # /// # use futures::Future; - /// # use tokio_core::reactor::Core; /// # use tokio_process::CommandExt; /// # /// # fn main() { - /// let core = Core::new().unwrap(); - /// let handle = core.handle(); - /// /// let child = Command::new("echo").arg("hello").arg("world") - /// .spawn_async(&handle) + /// .spawn_async() /// .expect("failed to spawn"); /// /// let do_cleanup = child.map(|_| ()) // Ignore result /// .map_err(|_| ()); // Ignore errors /// - /// handle.spawn(do_cleanup); + /// tokio::spawn(do_cleanup); /// # } /// ``` pub fn forget(mut self) {