From 4139e377e156d6933c23381e249d79abab7dac13 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 20 Jul 2025 13:04:06 +0900 Subject: [PATCH] chore: update windows-sys to 0.60 --- examples/Cargo.toml | 2 +- tokio/Cargo.toml | 4 ++-- tokio/src/process/windows.rs | 6 ++---- tokio/src/signal/windows/sys.rs | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 594d2191400..d734732b995 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -25,7 +25,7 @@ httpdate = "1.0" once_cell = "1.5.2" [target.'cfg(windows)'.dev-dependencies.windows-sys] -version = "0.59" +version = "0.60" [[example]] name = "chat" diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 2ee0fab0d0e..358a86404be 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -123,11 +123,11 @@ libc = { version = "0.2.168" } nix = { version = "0.29.0", default-features = false, features = ["aio", "fs", "socket"] } [target.'cfg(windows)'.dependencies.windows-sys] -version = "0.59" +version = "0.60" optional = true [target.'cfg(windows)'.dev-dependencies.windows-sys] -version = "0.59" +version = "0.60" features = [ "Win32_Foundation", "Win32_Security_Authorization", diff --git a/tokio/src/process/windows.rs b/tokio/src/process/windows.rs index c49df36b114..ba00b7c84b8 100644 --- a/tokio/src/process/windows.rs +++ b/tokio/src/process/windows.rs @@ -33,9 +33,7 @@ use std::sync::Arc; use std::task::{Context, Poll}; use windows_sys::{ - Win32::Foundation::{ - DuplicateHandle, BOOLEAN, DUPLICATE_SAME_ACCESS, HANDLE, INVALID_HANDLE_VALUE, - }, + Win32::Foundation::{DuplicateHandle, DUPLICATE_SAME_ACCESS, HANDLE, INVALID_HANDLE_VALUE}, Win32::System::Threading::{ GetCurrentProcess, RegisterWaitForSingleObject, UnregisterWaitEx, INFINITE, WT_EXECUTEINWAITTHREAD, WT_EXECUTEONLYONCE, @@ -163,7 +161,7 @@ impl Drop for Waiting { } } -unsafe extern "system" fn callback(ptr: *mut std::ffi::c_void, _timer_fired: BOOLEAN) { +unsafe extern "system" fn callback(ptr: *mut std::ffi::c_void, _timer_fired: bool) { let complete = &mut *(ptr as *mut Option>); let _ = complete.take().unwrap().send(()); } diff --git a/tokio/src/signal/windows/sys.rs b/tokio/src/signal/windows/sys.rs index 5831e33a3d1..8d81ad75f5b 100644 --- a/tokio/src/signal/windows/sys.rs +++ b/tokio/src/signal/windows/sys.rs @@ -4,7 +4,7 @@ use std::sync::Once; use crate::signal::registry::{globals, EventId, EventInfo, Init, Storage}; use crate::signal::RxFuture; -use windows_sys::Win32::Foundation::BOOL; +use windows_sys::core::BOOL; use windows_sys::Win32::System::Console as console; pub(super) fn ctrl_break() -> io::Result {