File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
src/libstd/sys/unix/process Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,12 @@ impl Command {
8484 Ok ( 0 ) => return Ok ( ( p, ours) ) ,
8585 Ok ( 8 ) => {
8686 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,
8989 "Validation on the CLOEXEC pipe failed: {:?}" ,
9090 bytes
9191 ) ;
92- let errno = combine ( errno. try_into ( ) . unwrap ( ) ) ;
92+ let errno = i32 :: from_be_bytes ( errno. try_into ( ) . unwrap ( ) ) ;
9393 assert ! ( p. wait( ) . is_ok( ) , "wait() should either return Ok or panic" ) ;
9494 return Err ( Error :: from_raw_os_error ( errno) ) ;
9595 }
@@ -105,10 +105,6 @@ impl Command {
105105 }
106106 }
107107 }
108-
109- fn combine ( arr : [ u8 ; 4 ] ) -> i32 {
110- i32:: from_be_bytes ( arr)
111- }
112108 }
113109
114110 pub fn exec ( & mut self , default : Stdio ) -> io:: Error {
You can’t perform that action at this time.
0 commit comments