about summary refs log tree commit diff
path: root/library/std/src/sys/anonymous_pipe/windows.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/anonymous_pipe/windows.rs')
-rw-r--r--library/std/src/sys/anonymous_pipe/windows.rs101
1 files changed, 2 insertions, 99 deletions
diff --git a/library/std/src/sys/anonymous_pipe/windows.rs b/library/std/src/sys/anonymous_pipe/windows.rs
index eb7fa8ec1c9..bdda7ffc5d2 100644
--- a/library/std/src/sys/anonymous_pipe/windows.rs
+++ b/library/std/src/sys/anonymous_pipe/windows.rs
@@ -1,12 +1,7 @@
-use crate::io::{self, PipeReader, PipeWriter};
-use crate::os::windows::io::{
-    AsHandle, AsRawHandle, BorrowedHandle, FromRawHandle, IntoRawHandle, OwnedHandle, RawHandle,
-};
-use crate::process::Stdio;
-use crate::ptr;
+use crate::os::windows::io::FromRawHandle;
 use crate::sys::c;
 use crate::sys::handle::Handle;
-use crate::sys_common::{FromInner, IntoInner};
+use crate::{io, ptr};
 
 pub type AnonPipe = Handle;
 
@@ -22,95 +17,3 @@ pub fn pipe() -> io::Result<(AnonPipe, AnonPipe)> {
         unsafe { Ok((Handle::from_raw_handle(read_pipe), Handle::from_raw_handle(write_pipe))) }
     }
 }
-
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl AsHandle for PipeReader {
-    fn as_handle(&self) -> BorrowedHandle<'_> {
-        self.0.as_handle()
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl AsRawHandle for PipeReader {
-    fn as_raw_handle(&self) -> RawHandle {
-        self.0.as_raw_handle()
-    }
-}
-
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl FromRawHandle for PipeReader {
-    unsafe fn from_raw_handle(raw_handle: RawHandle) -> Self {
-        unsafe { Self(Handle::from_raw_handle(raw_handle)) }
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl IntoRawHandle for PipeReader {
-    fn into_raw_handle(self) -> RawHandle {
-        self.0.into_raw_handle()
-    }
-}
-
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl From<PipeReader> for OwnedHandle {
-    fn from(pipe: PipeReader) -> Self {
-        Handle::into_inner(pipe.0)
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl From<PipeReader> for Stdio {
-    fn from(pipe: PipeReader) -> Self {
-        Self::from(OwnedHandle::from(pipe))
-    }
-}
-
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl AsHandle for PipeWriter {
-    fn as_handle(&self) -> BorrowedHandle<'_> {
-        self.0.as_handle()
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl AsRawHandle for PipeWriter {
-    fn as_raw_handle(&self) -> RawHandle {
-        self.0.as_raw_handle()
-    }
-}
-
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl FromRawHandle for PipeWriter {
-    unsafe fn from_raw_handle(raw_handle: RawHandle) -> Self {
-        unsafe { Self(Handle::from_raw_handle(raw_handle)) }
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl IntoRawHandle for PipeWriter {
-    fn into_raw_handle(self) -> RawHandle {
-        self.0.into_raw_handle()
-    }
-}
-
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl From<PipeWriter> for OwnedHandle {
-    fn from(pipe: PipeWriter) -> Self {
-        Handle::into_inner(pipe.0)
-    }
-}
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl From<PipeWriter> for Stdio {
-    fn from(pipe: PipeWriter) -> Self {
-        Self::from(OwnedHandle::from(pipe))
-    }
-}
-
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl From<OwnedHandle> for PipeReader {
-    fn from(owned_handle: OwnedHandle) -> Self {
-        Self(Handle::from_inner(owned_handle))
-    }
-}
-
-#[unstable(feature = "anonymous_pipe", issue = "127154")]
-impl From<OwnedHandle> for PipeWriter {
-    fn from(owned_handle: OwnedHandle) -> Self {
-        Self(Handle::from_inner(owned_handle))
-    }
-}