don't manually cast to self i32 type
This commit is contained in:
parent
55c0dd03df
commit
2b4ce8f1c7
|
@ -188,7 +188,7 @@ pub type SignalHandler = extern "C" fn(c_int);
|
|||
|
||||
pub fn signal(signal: i32, handler: SignalHandler) -> Result<()> {
|
||||
#[allow(clippy::single_match)]
|
||||
match unsafe { libc::signal(signal as i32, handler as libc::sighandler_t) } {
|
||||
match unsafe { libc::signal(signal, handler as libc::sighandler_t) } {
|
||||
libc::SIG_ERR => ctx_os_error(format_args!("invalid handler for {signal:?}")),
|
||||
_ => Ok(()),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue