Skip to content

Commit 60ba03e

Browse files
committed
fix(vfs): migrate IOCP backend to windows-sys 0.61
windows-sys 0.61 changed HANDLE from isize to *mut c_void, so NULL_HANDLE is now std::ptr::null_mut() instead of 0. Update the Cargo.toml version constraint to match.
1 parent 4939633 commit 60ba03e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ features = ["rt", "macros", "sync", "io-util", "time"]
4646
libc = "0.2"
4747

4848
[target.'cfg(windows)'.dependencies]
49-
windows-sys = { version = "0.52", features = [
49+
windows-sys = { version = "0.61", features = [
5050
"Win32_Foundation",
5151
"Win32_Storage_FileSystem",
5252
"Win32_System_IO",

src/vfs/iocp/port.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ use windows_sys::Win32::System::IO::{
1919
CreateIoCompletionPort, GetQueuedCompletionStatus, OVERLAPPED,
2020
};
2121

22-
// In windows-sys 0.52 `HANDLE` is `isize`. NULL handles are 0; the wrapper
23-
// uses the constant below for readability.
24-
const NULL_HANDLE: HANDLE = 0;
22+
// In windows-sys 0.61 `HANDLE` is `*mut c_void`. NULL handles are null
23+
// pointers; the wrapper uses the constant below for readability.
24+
const NULL_HANDLE: HANDLE = std::ptr::null_mut();
2525

2626
/// Owning wrapper around an IOCP `HANDLE`. Closed on drop.
2727
pub(crate) struct PortHandle {

0 commit comments

Comments
 (0)