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()); }