From e42466cbb925040aa68cad9563eabcfa27958315 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 04:55:33 +0000 Subject: [PATCH] Update windows-bindgen requirement from 0.56 to 0.57 Updates the requirements on [windows-bindgen](https://github.com/microsoft/windows-rs) to permit the latest version. - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/compare/0.56.0...0.57.0) --- updated-dependencies: - dependency-name: windows-bindgen dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- src/offset/local/win_bindings.rs | 28 ++++------------------------ 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e84c7eb8a7..182cf88d1c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,7 +52,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.56" } # The MSRV of its windows-metatada dependency is 1.70 +windows-bindgen = { version = "0.57" } # MSRV 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 ca2def1e65..e78a95566f 100644 --- a/src/offset/local/win_bindings.rs +++ b/src/offset/local/win_bindings.rs @@ -6,6 +6,7 @@ windows_targets::link!("kernel32.dll" "system" fn TzSpecificLocalTimeToSystemTim pub type BOOL = i32; pub type BOOLEAN = u8; #[repr(C)] +#[derive(Clone, Copy)] pub struct DYNAMIC_TIME_ZONE_INFORMATION { pub Bias: i32, pub StandardName: [u16; 32], @@ -17,24 +18,14 @@ pub struct DYNAMIC_TIME_ZONE_INFORMATION { pub TimeZoneKeyName: [u16; 128], pub DynamicDaylightTimeDisabled: BOOLEAN, } -impl Copy for DYNAMIC_TIME_ZONE_INFORMATION {} -impl Clone for DYNAMIC_TIME_ZONE_INFORMATION { - fn clone(&self) -> Self { - *self - } -} #[repr(C)] +#[derive(Clone, Copy)] pub struct FILETIME { pub dwLowDateTime: u32, pub dwHighDateTime: u32, } -impl Copy for FILETIME {} -impl Clone for FILETIME { - fn clone(&self) -> Self { - *self - } -} #[repr(C)] +#[derive(Clone, Copy)] pub struct SYSTEMTIME { pub wYear: u16, pub wMonth: u16, @@ -45,13 +36,8 @@ pub struct SYSTEMTIME { pub wSecond: u16, pub wMilliseconds: u16, } -impl Copy for SYSTEMTIME {} -impl Clone for SYSTEMTIME { - fn clone(&self) -> Self { - *self - } -} #[repr(C)] +#[derive(Clone, Copy)] pub struct TIME_ZONE_INFORMATION { pub Bias: i32, pub StandardName: [u16; 32], @@ -61,9 +47,3 @@ pub struct TIME_ZONE_INFORMATION { pub DaylightDate: SYSTEMTIME, pub DaylightBias: i32, } -impl Copy for TIME_ZONE_INFORMATION {} -impl Clone for TIME_ZONE_INFORMATION { - fn clone(&self) -> Self { - *self - } -}