diff --git a/src/sys/signal.rs b/src/sys/signal.rs index 78ae87c9fa..d295abcc7c 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -191,9 +191,10 @@ impl Signal { // implemented, we'll replace this function. #[inline] pub fn from_c_int(signum: libc::c_int) -> Result { - match 0 < signum && signum < NSIG { - true => Ok(unsafe { mem::transmute(signum) }), - false => Err(Error::invalid_argument()), + if 0 < signum && signum < NSIG { + Ok(unsafe { mem::transmute(signum) }) + } else { + Err(Error::invalid_argument()) } } }