From 26432355d59a8470e97ea1e58b82f512ed3ac06f Mon Sep 17 00:00:00 2001 From: Fenhl Date: Sat, 31 Aug 2019 18:45:41 +0000 Subject: [PATCH] tokio-process: Implement From for Command (#1513) --- tokio-net/src/process/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tokio-net/src/process/mod.rs b/tokio-net/src/process/mod.rs index f58feb525..62ffdc68d 100644 --- a/tokio-net/src/process/mod.rs +++ b/tokio-net/src/process/mod.rs @@ -641,6 +641,12 @@ impl Command { } } +impl From for Command { + fn from(std: StdCommand) -> Command { + Command { std } + } +} + /// A drop guard which ensures the child process is killed on drop to maintain /// the contract of dropping a Future leads to "cancellation". #[derive(Debug)]