don't manually cast to self i32 type

This commit is contained in:
Ryan Heywood 2025-07-09 00:57:48 -04:00
parent 55c0dd03df
commit 2b4ce8f1c7
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
1 changed files with 1 additions and 1 deletions

View File

@ -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(()),
}