1- use crate :: {
2- io,
3- os:: windows:: io:: {
4- AsHandle , AsRawHandle , BorrowedHandle , FromRawHandle , IntoRawHandle , OwnedHandle , RawHandle ,
5- } ,
6- pipe:: { PipeReader , PipeWriter } ,
7- process:: Stdio ,
8- sys:: { handle:: Handle , pipe:: unnamed_anon_pipe} ,
9- sys_common:: { FromInner , IntoInner } ,
1+ use crate :: io;
2+ use crate :: os:: windows:: io:: {
3+ AsHandle , AsRawHandle , BorrowedHandle , FromRawHandle , IntoRawHandle , OwnedHandle , RawHandle ,
104} ;
5+ use crate :: pipe:: { PipeReader , PipeWriter } ;
6+ use crate :: process:: Stdio ;
7+ use crate :: sys:: { handle:: Handle , pipe:: unnamed_anon_pipe} ;
8+ use crate :: sys_common:: { FromInner , IntoInner } ;
119
12- pub ( crate ) type AnonPipe = Handle ;
10+ pub type AnonPipe = Handle ;
1311
1412#[ inline]
15- pub ( crate ) fn pipe ( ) -> io:: Result < ( AnonPipe , AnonPipe ) > {
13+ pub fn pipe ( ) -> io:: Result < ( AnonPipe , AnonPipe ) > {
1614 unnamed_anon_pipe ( ) . map ( |( rx, wx) | ( rx. into_inner ( ) , wx. into_inner ( ) ) )
1715}
1816
@@ -32,7 +30,7 @@ impl AsRawHandle for PipeReader {
3230#[ unstable( feature = "anonymous_pipe" , issue = "127154" ) ]
3331impl FromRawHandle for PipeReader {
3432 unsafe fn from_raw_handle ( raw_handle : RawHandle ) -> Self {
35- Self ( Handle :: from_raw_handle ( raw_handle) )
33+ unsafe { Self ( Handle :: from_raw_handle ( raw_handle) ) }
3634 }
3735}
3836#[ unstable( feature = "anonymous_pipe" , issue = "127154" ) ]
@@ -71,7 +69,7 @@ impl AsRawHandle for PipeWriter {
7169#[ unstable( feature = "anonymous_pipe" , issue = "127154" ) ]
7270impl FromRawHandle for PipeWriter {
7371 unsafe fn from_raw_handle ( raw_handle : RawHandle ) -> Self {
74- Self ( Handle :: from_raw_handle ( raw_handle) )
72+ unsafe { Self ( Handle :: from_raw_handle ( raw_handle) ) }
7573 }
7674}
7775#[ unstable( feature = "anonymous_pipe" , issue = "127154" ) ]
0 commit comments