Skip to content

Commit

Permalink
Replace boolean match with if/else
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryant Mairs committed Dec 16, 2017
1 parent e1099ee commit 222c20d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/sys/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,10 @@ impl Signal {
// implemented, we'll replace this function.
#[inline]
pub fn from_c_int(signum: libc::c_int) -> Result<Signal> {
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())
}
}
}
Expand Down

0 comments on commit 222c20d

Please sign in to comment.