Allow cvt_nz to be unused on some platforms.

This commit is contained in:
Mara Bos 2022-04-09 16:13:25 +02:00
parent 5b2591299a
commit 8a2c9a9615

View File

@ -215,6 +215,7 @@ where
} }
} }
#[allow(dead_code)] // Not used on all platforms.
pub fn cvt_nz(error: libc::c_int) -> crate::io::Result<()> { pub fn cvt_nz(error: libc::c_int) -> crate::io::Result<()> {
if error == 0 { Ok(()) } else { Err(crate::io::Error::from_raw_os_error(error)) } if error == 0 { Ok(()) } else { Err(crate::io::Error::from_raw_os_error(error)) }
} }