From 2df63a4c13d1764b6fca130ba197ad17d4ddfb6d Mon Sep 17 00:00:00 2001 From: Paul Dicker Date: Mon, 11 Mar 2024 07:05:32 +0100 Subject: [PATCH] Update windows-bindgen to 0.55 --- Cargo.toml | 2 +- src/offset/local/win_bindings.rs | 26 ++++++++++++-------------- src/offset/local/win_bindings.txt | 2 +- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 308d307d3c..5349c2c6ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,7 +53,7 @@ js-sys = { version = "0.3", optional = true } # contains FFI bindings for windows-targets = { version = "0.52", optional = true } [target.'cfg(windows)'.dev-dependencies] -windows-bindgen = { version = "0.54" } # The MSRV of its windows-metatada 0.54 dependency is 1.70 +windows-bindgen = { version = "0.55" } # The MSRV of its windows-metatada dependency is 1.70 [target.'cfg(unix)'.dependencies] iana-time-zone = { version = "0.1.45", optional = true, features = ["fallback"] } diff --git a/src/offset/local/win_bindings.rs b/src/offset/local/win_bindings.rs index 39060adadd..ca2def1e65 100644 --- a/src/offset/local/win_bindings.rs +++ b/src/offset/local/win_bindings.rs @@ -1,10 +1,8 @@ -// Bindings generated by `windows-bindgen` 0.54.0 - #![allow(non_snake_case, non_upper_case_globals, non_camel_case_types, dead_code, clippy::all)] -::windows_targets::link!("kernel32.dll" "system" fn GetTimeZoneInformationForYear(wyear : u16, pdtzi : *const DYNAMIC_TIME_ZONE_INFORMATION, ptzi : *mut TIME_ZONE_INFORMATION) -> BOOL); -::windows_targets::link!("kernel32.dll" "system" fn SystemTimeToFileTime(lpsystemtime : *const SYSTEMTIME, lpfiletime : *mut FILETIME) -> BOOL); -::windows_targets::link!("kernel32.dll" "system" fn SystemTimeToTzSpecificLocalTime(lptimezoneinformation : *const TIME_ZONE_INFORMATION, lpuniversaltime : *const SYSTEMTIME, lplocaltime : *mut SYSTEMTIME) -> BOOL); -::windows_targets::link!("kernel32.dll" "system" fn TzSpecificLocalTimeToSystemTime(lptimezoneinformation : *const TIME_ZONE_INFORMATION, lplocaltime : *const SYSTEMTIME, lpuniversaltime : *mut SYSTEMTIME) -> BOOL); +windows_targets::link!("kernel32.dll" "system" fn GetTimeZoneInformationForYear(wyear : u16, pdtzi : *const DYNAMIC_TIME_ZONE_INFORMATION, ptzi : *mut TIME_ZONE_INFORMATION) -> BOOL); +windows_targets::link!("kernel32.dll" "system" fn SystemTimeToFileTime(lpsystemtime : *const SYSTEMTIME, lpfiletime : *mut FILETIME) -> BOOL); +windows_targets::link!("kernel32.dll" "system" fn SystemTimeToTzSpecificLocalTime(lptimezoneinformation : *const TIME_ZONE_INFORMATION, lpuniversaltime : *const SYSTEMTIME, lplocaltime : *mut SYSTEMTIME) -> BOOL); +windows_targets::link!("kernel32.dll" "system" fn TzSpecificLocalTimeToSystemTime(lptimezoneinformation : *const TIME_ZONE_INFORMATION, lplocaltime : *const SYSTEMTIME, lpuniversaltime : *mut SYSTEMTIME) -> BOOL); pub type BOOL = i32; pub type BOOLEAN = u8; #[repr(C)] @@ -19,8 +17,8 @@ pub struct DYNAMIC_TIME_ZONE_INFORMATION { pub TimeZoneKeyName: [u16; 128], pub DynamicDaylightTimeDisabled: BOOLEAN, } -impl ::core::marker::Copy for DYNAMIC_TIME_ZONE_INFORMATION {} -impl ::core::clone::Clone for DYNAMIC_TIME_ZONE_INFORMATION { +impl Copy for DYNAMIC_TIME_ZONE_INFORMATION {} +impl Clone for DYNAMIC_TIME_ZONE_INFORMATION { fn clone(&self) -> Self { *self } @@ -30,8 +28,8 @@ pub struct FILETIME { pub dwLowDateTime: u32, pub dwHighDateTime: u32, } -impl ::core::marker::Copy for FILETIME {} -impl ::core::clone::Clone for FILETIME { +impl Copy for FILETIME {} +impl Clone for FILETIME { fn clone(&self) -> Self { *self } @@ -47,8 +45,8 @@ pub struct SYSTEMTIME { pub wSecond: u16, pub wMilliseconds: u16, } -impl ::core::marker::Copy for SYSTEMTIME {} -impl ::core::clone::Clone for SYSTEMTIME { +impl Copy for SYSTEMTIME {} +impl Clone for SYSTEMTIME { fn clone(&self) -> Self { *self } @@ -63,8 +61,8 @@ pub struct TIME_ZONE_INFORMATION { pub DaylightDate: SYSTEMTIME, pub DaylightBias: i32, } -impl ::core::marker::Copy for TIME_ZONE_INFORMATION {} -impl ::core::clone::Clone for TIME_ZONE_INFORMATION { +impl Copy for TIME_ZONE_INFORMATION {} +impl Clone for TIME_ZONE_INFORMATION { fn clone(&self) -> Self { *self } diff --git a/src/offset/local/win_bindings.txt b/src/offset/local/win_bindings.txt index 7fb3e2fa1c..fc00509cfb 100644 --- a/src/offset/local/win_bindings.txt +++ b/src/offset/local/win_bindings.txt @@ -1,5 +1,5 @@ --out src/offset/local/win_bindings.rs ---config flatten sys +--config flatten sys no-bindgen-comment --filter Windows.Win32.System.Time.GetTimeZoneInformationForYear Windows.Win32.System.Time.SystemTimeToFileTime