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 ,
10
4
} ;
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 } ;
11
9
12
- pub ( crate ) type AnonPipe = Handle ;
10
+ pub type AnonPipe = Handle ;
13
11
14
12
#[ inline]
15
- pub ( crate ) fn pipe ( ) -> io:: Result < ( AnonPipe , AnonPipe ) > {
13
+ pub fn pipe ( ) -> io:: Result < ( AnonPipe , AnonPipe ) > {
16
14
unnamed_anon_pipe ( ) . map ( |( rx, wx) | ( rx. into_inner ( ) , wx. into_inner ( ) ) )
17
15
}
18
16
@@ -32,7 +30,7 @@ impl AsRawHandle for PipeReader {
32
30
#[ unstable( feature = "anonymous_pipe" , issue = "127154" ) ]
33
31
impl FromRawHandle for PipeReader {
34
32
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) ) }
36
34
}
37
35
}
38
36
#[ unstable( feature = "anonymous_pipe" , issue = "127154" ) ]
@@ -71,7 +69,7 @@ impl AsRawHandle for PipeWriter {
71
69
#[ unstable( feature = "anonymous_pipe" , issue = "127154" ) ]
72
70
impl FromRawHandle for PipeWriter {
73
71
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) ) }
75
73
}
76
74
}
77
75
#[ unstable( feature = "anonymous_pipe" , issue = "127154" ) ]
0 commit comments