From cc7f55b677a8e81f7734f54dfbd155bc2636f84b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 00:29:22 +0000 Subject: [PATCH] chore(deps): Update Rust crate windows-sys to 0.59.0 --- Cargo.lock | 67 ++++++++++++++++------------ crates/anstyle-query/Cargo.toml | 2 +- crates/anstyle-query/src/windows.rs | 5 ++- crates/anstyle-wincon/Cargo.toml | 2 +- crates/anstyle-wincon/src/windows.rs | 13 +++--- 5 files changed, 50 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f09b9182..8affe25f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -151,7 +151,7 @@ dependencies = [ name = "anstyle-query" version = "1.1.1" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -220,7 +220,7 @@ version = "3.0.4" dependencies = [ "anstyle 1.0.8", "lexopt", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -618,7 +618,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1101,7 +1101,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -1121,18 +1130,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -1143,9 +1152,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -1155,9 +1164,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -1167,15 +1176,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -1185,9 +1194,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -1197,9 +1206,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -1209,9 +1218,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -1221,9 +1230,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "yansi" diff --git a/crates/anstyle-query/Cargo.toml b/crates/anstyle-query/Cargo.toml index 6f4ef963..2a43c610 100644 --- a/crates/anstyle-query/Cargo.toml +++ b/crates/anstyle-query/Cargo.toml @@ -24,7 +24,7 @@ pre-release-replacements = [ ] [target.'cfg(windows)'.dependencies] -windows-sys = { version = "0.52.0", features = ["Win32_System_Console", "Win32_Foundation"] } +windows-sys = { version = "0.59.0", features = ["Win32_System_Console", "Win32_Foundation"] } [lints] workspace = true diff --git a/crates/anstyle-query/src/windows.rs b/crates/anstyle-query/src/windows.rs index ba4971aa..4ac18965 100644 --- a/crates/anstyle-query/src/windows.rs +++ b/crates/anstyle-query/src/windows.rs @@ -5,13 +5,14 @@ mod windows_console { use std::os::windows::io::AsRawHandle; use std::os::windows::io::RawHandle; + use windows_sys::Win32::Foundation::HANDLE; use windows_sys::Win32::System::Console::CONSOLE_MODE; use windows_sys::Win32::System::Console::ENABLE_VIRTUAL_TERMINAL_PROCESSING; fn enable_vt(handle: RawHandle) -> std::io::Result<()> { unsafe { - let handle = std::mem::transmute(handle); - if handle == 0 { + let handle: HANDLE = std::mem::transmute(handle); + if handle.is_null() { return Err(std::io::Error::new( std::io::ErrorKind::BrokenPipe, "console is detached", diff --git a/crates/anstyle-wincon/Cargo.toml b/crates/anstyle-wincon/Cargo.toml index 39cfcda8..5773733a 100644 --- a/crates/anstyle-wincon/Cargo.toml +++ b/crates/anstyle-wincon/Cargo.toml @@ -32,7 +32,7 @@ anstyle = { version = "1.0.0", path = "../anstyle" } lexopt = "0.3.0" [target.'cfg(windows)'.dependencies] -windows-sys = { version = "0.52.0", features = ["Win32_System_Console", "Win32_Foundation"] } +windows-sys = { version = "0.59.0", features = ["Win32_System_Console", "Win32_Foundation"] } [lints] workspace = true diff --git a/crates/anstyle-wincon/src/windows.rs b/crates/anstyle-wincon/src/windows.rs index bf1cf565..d18e8ff4 100644 --- a/crates/anstyle-wincon/src/windows.rs +++ b/crates/anstyle-wincon/src/windows.rs @@ -86,6 +86,9 @@ pub(crate) fn write_colored( } mod inner { + use std::os::windows::io::RawHandle; + + use windows_sys::Win32::Foundation::HANDLE; use windows_sys::Win32::System::Console::CONSOLE_CHARACTER_ATTRIBUTES; use windows_sys::Win32::System::Console::CONSOLE_SCREEN_BUFFER_INFO; use windows_sys::Win32::System::Console::FOREGROUND_BLUE; @@ -93,8 +96,6 @@ mod inner { use windows_sys::Win32::System::Console::FOREGROUND_INTENSITY; use windows_sys::Win32::System::Console::FOREGROUND_RED; - use std::os::windows::io::RawHandle; - const FOREGROUND_CYAN: CONSOLE_CHARACTER_ATTRIBUTES = FOREGROUND_BLUE | FOREGROUND_GREEN; const FOREGROUND_MAGENTA: CONSOLE_CHARACTER_ATTRIBUTES = FOREGROUND_BLUE | FOREGROUND_RED; const FOREGROUND_YELLOW: CONSOLE_CHARACTER_ATTRIBUTES = FOREGROUND_GREEN | FOREGROUND_RED; @@ -128,8 +129,8 @@ mod inner { handle: RawHandle, ) -> Result { unsafe { - let handle = std::mem::transmute(handle); - if handle == 0 { + let handle: HANDLE = std::mem::transmute(handle); + if handle.is_null() { return Err(IoError::BrokenPipe); } @@ -149,8 +150,8 @@ mod inner { attributes: CONSOLE_CHARACTER_ATTRIBUTES, ) -> Result<(), IoError> { unsafe { - let handle = std::mem::transmute(handle); - if handle == 0 { + let handle: HANDLE = std::mem::transmute(handle); + if handle.is_null() { return Err(IoError::BrokenPipe); }