File tree 1 file changed +3
-7
lines changed
src/libstd/sys/unix/process
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,12 @@ impl Command {
84
84
Ok ( 0 ) => return Ok ( ( p, ours) ) ,
85
85
Ok ( 8 ) => {
86
86
let ( errno, footer) = bytes. split_at ( 4 ) ;
87
- assert ! (
88
- combine ( CLOEXEC_MSG_FOOTER ) == combine ( footer. try_into ( ) . unwrap ( ) ) ,
87
+ assert_eq ! (
88
+ CLOEXEC_MSG_FOOTER , footer,
89
89
"Validation on the CLOEXEC pipe failed: {:?}" ,
90
90
bytes
91
91
) ;
92
- let errno = combine ( errno. try_into ( ) . unwrap ( ) ) ;
92
+ let errno = i32 :: from_be_bytes ( errno. try_into ( ) . unwrap ( ) ) ;
93
93
assert ! ( p. wait( ) . is_ok( ) , "wait() should either return Ok or panic" ) ;
94
94
return Err ( Error :: from_raw_os_error ( errno) ) ;
95
95
}
@@ -105,10 +105,6 @@ impl Command {
105
105
}
106
106
}
107
107
}
108
-
109
- fn combine ( arr : [ u8 ; 4 ] ) -> i32 {
110
- i32:: from_be_bytes ( arr)
111
- }
112
108
}
113
109
114
110
pub fn exec ( & mut self , default : Stdio ) -> io:: Error {
You can’t perform that action at this time.
0 commit comments