From 2727f82526ba1191ed6faaa5ab118833aa2fffdf Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 22 Aug 2023 19:02:06 +0100 Subject: [PATCH] std: unix process_unsupported: Provide a wait status emulation (fmt) Worsify formatting as required by rustfmt. --- .../process/process_unsupported/wait_status.rs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/library/std/src/sys/unix/process/process_unsupported/wait_status.rs b/library/std/src/sys/unix/process/process_unsupported/wait_status.rs index 17004779a62e..f465946a5288 100644 --- a/library/std/src/sys/unix/process/process_unsupported/wait_status.rs +++ b/library/std/src/sys/unix/process/process_unsupported/wait_status.rs @@ -37,20 +37,12 @@ impl ExitStatus { // Likewise the macros disregard all the high bits, so are happy to declare // out-of-range values to be WIFEXITED, WIFSTOPPED, etc. let w = self.wait_status; - if (w & 0x7f) == 0 { - Some((w & 0xff00) >> 8) - } else { - None - } + if (w & 0x7f) == 0 { Some((w & 0xff00) >> 8) } else { None } } pub fn signal(&self) -> Option { let signal = self.wait_status & 0x007f; - if signal > 0 && signal < 0x7f { - Some(signal) - } else { - None - } + if signal > 0 && signal < 0x7f { Some(signal) } else { None } } pub fn core_dumped(&self) -> bool { @@ -59,11 +51,7 @@ impl ExitStatus { pub fn stopped_signal(&self) -> Option { let w = self.wait_status; - if (w & 0xff) == 0x7f { - Some((w & 0xff00) >> 8) - } else { - None - } + if (w & 0xff) == 0x7f { Some((w & 0xff00) >> 8) } else { None } } pub fn continued(&self) -> bool {