From a12a83cea2b1a10132ae810da86d3c51caeedaf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Thu, 28 Oct 2021 01:03:54 +1300 Subject: [PATCH] Fix mistaken assumption in ProcessEnd::from(unix) --- lib/src/event.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/src/event.rs b/lib/src/event.rs index 979fd48..88c9fab 100644 --- a/lib/src/event.rs +++ b/lib/src/event.rs @@ -170,18 +170,12 @@ impl From for ProcessEnd { } (Some(code), None) => match NonZeroI64::try_from(i64::from(code)) { Ok(code) => Self::ExitError(code), - Err(_) if cfg!(debug_assertions) => { - unreachable!("exitstatus code cannot be zero?!") - } Err(_) => Self::Success, }, // TODO: once unix_process_wait_more lands, use stopped_signal() instead and clear the libc dep (None, Some(signal)) if libc::WIFSTOPPED(-signal) => { match NonZeroI32::try_from(libc::WSTOPSIG(-signal)) { Ok(signal) => Self::ExitStop(signal), - Err(_) if cfg!(debug_assertions) => { - unreachable!("exitsignal code cannot be zero?!") - } Err(_) => Self::Success, } }