]> git.lizzy.rs Git - rust.git/commit
Auto merge of #42133 - cuviper:stdio-from, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 7 Jun 2017 02:11:20 +0000 (02:11 +0000)
committerbors <bors@rust-lang.org>
Wed, 7 Jun 2017 02:11:20 +0000 (02:11 +0000)
commit21d0f9144489b043f5b493c998de1c8afedb1321
treee5e1787ce1385fe2d307965c56abb135d299bd8e
parent76242aebb9d47558124c991a6faf0eb706d35703
parent9debe91675222782e08fbb15bb6359a05bf85131
Auto merge of #42133 - cuviper:stdio-from, r=alexcrichton

Add conversions from File and Child* handles to Stdio

`Stdio` now implements `From<ChildStdin>`, `From<ChildStdout>`,
`From<ChildStderr>`, and `From<File>`.

The `Command::stdin`/`stdout`/`stderr` methods now take any type that
implements `Into<Stdio>`.

This makes it much easier to write shell-like command chains, piping to
one another and redirecting to and from files.  Otherwise one would need
to use the unsafe and OS-specific `from_raw_fd` or `from_raw_handle`.