diff options
| author | divens <divens@users.noreply.github.com> | 2026-05-06 17:02:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-06 17:02:10 +0200 |
| commit | cc86e31b840cfd1993f256513047dfe980408398 (patch) | |
| tree | 0292baf8bcc5dbb109cef03e1623c9ccdf98b9cd /zellij-client | |
| parent | Independent tab sizes (#5133) (diff) | |
| download | sl0ppij-cc86e31b840cfd1993f256513047dfe980408398.tar.gz sl0ppij-cc86e31b840cfd1993f256513047dfe980408398.tar.xz sl0ppij-cc86e31b840cfd1993f256513047dfe980408398.zip | |
fix(windows): bump windows-sys to 0.59 (#5139)
The workspace `windows-sys` constraint was pinned to 0.52 while the
Windows source uses APIs and namespaces from 0.59 (e.g. WriteFile in
Win32::Storage::FileSystem). CI built fine because Cargo.lock pinned
0.59, but downstream `cargo install`/`cargo binstall` did fresh
resolution and selected 0.52, breaking the build for users on Windows.
Align the manifest with the code:
- Bump workspace dep `windows-sys` from 0.52 to 0.59.
- HANDLE is now `*mut c_void` instead of `isize`: replace
`handle == 0` / `!= 0` with `is_null()`, initialise HANDLE locals
with `std::ptr::null_mut()`, and pass `null_mut()` as the
hTemplateFile argument to CreateFileW.
- Pass the process HANDLE through the exit-monitor thread as `usize`
(raw pointers are not Send; OS handles are safe to use cross-thread).
- Note: HPCON is still `isize` in 0.59, so its zero-init is unchanged.
Diffstat (limited to 'zellij-client')
| -rw-r--r-- | zellij-client/src/stdin_handler_windows.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zellij-client/src/stdin_handler_windows.rs b/zellij-client/src/stdin_handler_windows.rs index d6eba7cb..d22c790f 100644 --- a/zellij-client/src/stdin_handler_windows.rs +++ b/zellij-client/src/stdin_handler_windows.rs @@ -29,7 +29,7 @@ static ORIGINAL_CONSOLE_MODE: OnceLock<u32> = OnceLock::new(); pub(crate) fn enable_vt_input() -> bool { unsafe { let handle = GetStdHandle(STD_INPUT_HANDLE); - if handle == 0 || handle == INVALID_HANDLE_VALUE { + if handle.is_null() || handle == INVALID_HANDLE_VALUE { return false; } let mut mode: u32 = 0; @@ -77,7 +77,7 @@ pub(crate) fn restore_vt_input() { if let Some(&original_mode) = ORIGINAL_CONSOLE_MODE.get() { unsafe { let handle = GetStdHandle(STD_INPUT_HANDLE); - if handle != 0 && handle != INVALID_HANDLE_VALUE { + if !handle.is_null() && handle != INVALID_HANDLE_VALUE { SetConsoleMode(handle, original_mode); } } |
