summaryrefslogtreecommitdiffstats
path: root/tokio-net
diff options
context:
space:
mode:
authorFenhl <fenhl@fenhl.net>2019-08-31 18:45:41 +0000
committerIvan Petkov <ivanppetkov@gmail.com>2019-08-31 11:45:41 -0700
commit26432355d59a8470e97ea1e58b82f512ed3ac06f (patch)
tree14b242ae2061629962bb5f82636002ae4a52d2dc /tokio-net
parent2f91c85ad80c1311225ef482f6feb3c18b441edc (diff)
tokio-process: Implement From<StdCommand> for Command (#1513)
Diffstat (limited to 'tokio-net')
-rw-r--r--tokio-net/src/process/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tokio-net/src/process/mod.rs b/tokio-net/src/process/mod.rs
index f58feb52..62ffdc68 100644
--- a/tokio-net/src/process/mod.rs
+++ b/tokio-net/src/process/mod.rs
@@ -641,6 +641,12 @@ impl Command {
}
}
+impl From<StdCommand> 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)]