File tree 1 file changed +3
-15
lines changed
library/std/src/sys/unix/process/process_unsupported
1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -37,20 +37,12 @@ impl ExitStatus {
37
37
// Likewise the macros disregard all the high bits, so are happy to declare
38
38
// out-of-range values to be WIFEXITED, WIFSTOPPED, etc.
39
39
let w = self . wait_status ;
40
- if ( w & 0x7f ) == 0 {
41
- Some ( ( w & 0xff00 ) >> 8 )
42
- } else {
43
- None
44
- }
40
+ if ( w & 0x7f ) == 0 { Some ( ( w & 0xff00 ) >> 8 ) } else { None }
45
41
}
46
42
47
43
pub fn signal ( & self ) -> Option < i32 > {
48
44
let signal = self . wait_status & 0x007f ;
49
- if signal > 0 && signal < 0x7f {
50
- Some ( signal)
51
- } else {
52
- None
53
- }
45
+ if signal > 0 && signal < 0x7f { Some ( signal) } else { None }
54
46
}
55
47
56
48
pub fn core_dumped ( & self ) -> bool {
@@ -59,11 +51,7 @@ impl ExitStatus {
59
51
60
52
pub fn stopped_signal ( & self ) -> Option < i32 > {
61
53
let w = self . wait_status ;
62
- if ( w & 0xff ) == 0x7f {
63
- Some ( ( w & 0xff00 ) >> 8 )
64
- } else {
65
- None
66
- }
54
+ if ( w & 0xff ) == 0x7f { Some ( ( w & 0xff00 ) >> 8 ) } else { None }
67
55
}
68
56
69
57
pub fn continued ( & self ) -> bool {
You can’t perform that action at this time.
0 commit comments