diff --git a/Cargo.toml b/Cargo.toml index 70aaa06..9d7c0b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,13 +15,13 @@ readme = "README.md" rust-version = "1.69.0" [target.'cfg(unix)'.dependencies] -nix = { version = "0.28", default-features = false, features = ["fs", "signal"]} +nix = { version = "0.29", default-features = false, features = ["fs", "signal"]} [target.'cfg(windows)'.dependencies] -windows-sys = { version = "0.52", features = ["Win32_Foundation", "Win32_System_Threading", "Win32_Security", "Win32_System_Console"] } +windows-sys = { version = "0.59", features = ["Win32_Foundation", "Win32_System_Threading", "Win32_Security", "Win32_System_Console"] } [target.'cfg(windows)'.dev-dependencies] -windows-sys = { version = "0.52", features = ["Win32_Storage_FileSystem", "Win32_Foundation", "Win32_System_IO", "Win32_System_Console"] } +windows-sys = { version = "0.59", features = ["Win32_Storage_FileSystem", "Win32_Foundation", "Win32_System_IO", "Win32_System_Console"] } [features] termination = [] diff --git a/src/platform/windows/mod.rs b/src/platform/windows/mod.rs index 5f701f7..187b156 100644 --- a/src/platform/windows/mod.rs +++ b/src/platform/windows/mod.rs @@ -43,7 +43,7 @@ unsafe extern "system" fn os_handler(_: u32) -> BOOL { #[inline] pub unsafe fn init_os_handler(_overwrite: bool) -> Result<(), Error> { SEMAPHORE = CreateSemaphoreA(ptr::null_mut(), 0, MAX_SEM_COUNT, ptr::null()); - if SEMAPHORE == 0 { + if SEMAPHORE.is_null() { return Err(io::Error::last_os_error()); } diff --git a/tests/main/harness.rs b/tests/main/harness.rs index 8ba5efc..24113f8 100644 --- a/tests/main/harness.rs +++ b/tests/main/harness.rs @@ -88,7 +88,7 @@ pub mod platform { fn new() -> io::Result { unsafe { let stdout = GetStdHandle(STD_OUTPUT_HANDLE); - if stdout == 0 || stdout == INVALID_HANDLE_VALUE { + if stdout.is_null() || stdout == INVALID_HANDLE_VALUE { return Err(io::Error::last_os_error()); } @@ -139,7 +139,7 @@ pub mod platform { 0 as HANDLE, ); - if stdout == 0 || stdout == INVALID_HANDLE_VALUE { + if stdout.is_null() || stdout == INVALID_HANDLE_VALUE { Err(io::Error::last_os_error()) } else { Ok(stdout)