Skip to content

Commit

Permalink
Update nix to 0.29, windows-sys to 0.59
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Aug 5, 2024
1 parent b543abe commit 9b11253
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
2 changes: 1 addition & 1 deletion src/platform/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down
4 changes: 2 additions & 2 deletions tests/main/harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub mod platform {
fn new() -> io::Result<Output> {
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());
}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 9b11253

Please sign in to comment.