Skip to content

Commit 6a85301

Browse files
committed
Upgrade to windows-bindgen 0.61
1 parent 265c79b commit 6a85301

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ js-sys = { version = "0.3", optional = true } # contains FFI bindings for
5252
windows-link = { version = "0.1", optional = true }
5353

5454
[target.'cfg(windows)'.dev-dependencies]
55-
windows-bindgen = { version = "0.60" } # MSRV is 1.74
55+
windows-bindgen = { version = "0.61" } # MSRV is 1.74
5656

5757
[target.'cfg(unix)'.dependencies]
5858
iana-time-zone = { version = "0.1.45", optional = true, features = ["fallback"] }

src/offset/local/win_bindings.rs

+12-2
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,19 @@ pub struct DYNAMIC_TIME_ZONE_INFORMATION {
1818
pub TimeZoneKeyName: [u16; 128],
1919
pub DynamicDaylightTimeDisabled: bool,
2020
}
21+
impl Default for DYNAMIC_TIME_ZONE_INFORMATION {
22+
fn default() -> Self {
23+
unsafe { core::mem::zeroed() }
24+
}
25+
}
2126
#[repr(C)]
22-
#[derive(Clone, Copy)]
27+
#[derive(Clone, Copy, Default)]
2328
pub struct FILETIME {
2429
pub dwLowDateTime: u32,
2530
pub dwHighDateTime: u32,
2631
}
2732
#[repr(C)]
28-
#[derive(Clone, Copy)]
33+
#[derive(Clone, Copy, Default)]
2934
pub struct SYSTEMTIME {
3035
pub wYear: u16,
3136
pub wMonth: u16,
@@ -47,3 +52,8 @@ pub struct TIME_ZONE_INFORMATION {
4752
pub DaylightDate: SYSTEMTIME,
4853
pub DaylightBias: i32,
4954
}
55+
impl Default for TIME_ZONE_INFORMATION {
56+
fn default() -> Self {
57+
unsafe { core::mem::zeroed() }
58+
}
59+
}

0 commit comments

Comments
 (0)