diff options
| author | Vincent Thiberville <vthib@pm.me> | 2022-07-06 15:29:17 +0200 | 
|---|---|---|
| committer | Vincent Thiberville <vthib@pm.me> | 2023-05-30 15:39:17 +0200 | 
| commit | 7ebbdc6e3b8c8cec8dc78c20f961c4fae415a5a0 (patch) | |
| tree | d9c4735837c0b94ff5114fec1a03c7dd0b4c32a6 /library/std/src/sys/unix/pipe.rs | |
| parent | 3266c36624e804f9f086ebd40db19039b55a4ec1 (diff) | |
| download | rust-7ebbdc6e3b8c8cec8dc78c20f961c4fae415a5a0.tar.gz rust-7ebbdc6e3b8c8cec8dc78c20f961c4fae415a5a0.zip | |
add FromOwnedFd/FromOwnedHandle for ChildStdin/out/err
Diffstat (limited to 'library/std/src/sys/unix/pipe.rs')
| -rw-r--r-- | library/std/src/sys/unix/pipe.rs | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/library/std/src/sys/unix/pipe.rs b/library/std/src/sys/unix/pipe.rs index 938a46bfdd8..a9c783b4623 100644 --- a/library/std/src/sys/unix/pipe.rs +++ b/library/std/src/sys/unix/pipe.rs @@ -3,7 +3,7 @@ use crate::mem; use crate::os::unix::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, RawFd}; use crate::sys::fd::FileDesc; use crate::sys::{cvt, cvt_r}; -use crate::sys_common::IntoInner; +use crate::sys_common::{FromInner, IntoInner}; //////////////////////////////////////////////////////////////////////////////// // Anonymous pipes @@ -158,3 +158,9 @@ impl FromRawFd for AnonPipe { Self(FromRawFd::from_raw_fd(raw_fd)) } } + +impl FromInner<FileDesc> for AnonPipe { + fn from_inner(fd: FileDesc) -> Self { + Self(fd) + } +} | 
