Skip to content

Commit 4dbbf2a

Browse files
chore(deps): update windows-sys to 0.60 to align with muda (#285)
* Update windows-sys to 0.60 to align with muda * Remove unused `Accel` from muda
1 parent c9f0d21 commit 4dbbf2a

File tree

3 files changed

+99
-53
lines changed

3 files changed

+99
-53
lines changed

Cargo.lock

Lines changed: 97 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ thiserror = "2"
2424
serde = { version = "1", optional = true }
2525

2626
[target."cfg(target_os = \"windows\")".dependencies.windows-sys]
27-
version = "0.59"
27+
version = "0.60"
2828
features = [
2929
"Win32_UI_WindowsAndMessaging",
3030
"Win32_Foundation",

src/platform_impl/windows/util.rs

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,14 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// SPDX-License-Identifier: MIT
44

5-
use std::ops::{Deref, DerefMut};
6-
7-
use windows_sys::Win32::{
8-
Foundation::HWND,
9-
UI::WindowsAndMessaging::{ACCEL, WINDOW_LONG_PTR_INDEX},
10-
};
5+
use windows_sys::Win32::{Foundation::HWND, UI::WindowsAndMessaging::WINDOW_LONG_PTR_INDEX};
116

127
pub fn encode_wide<S: AsRef<std::ffi::OsStr>>(string: S) -> Vec<u16> {
138
std::os::windows::prelude::OsStrExt::encode_wide(string.as_ref())
149
.chain(std::iter::once(0))
1510
.collect()
1611
}
1712

18-
/// ACCEL wrapper to implement Debug
19-
#[derive(Clone)]
20-
#[repr(transparent)]
21-
pub struct Accel(pub ACCEL);
22-
23-
impl std::fmt::Debug for Accel {
24-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
25-
f.debug_struct("ACCEL")
26-
.field("key", &self.0.key)
27-
.field("cmd", &self.0.cmd)
28-
.field("fVirt", &self.0.fVirt)
29-
.finish()
30-
}
31-
}
32-
33-
impl Deref for Accel {
34-
type Target = ACCEL;
35-
36-
fn deref(&self) -> &Self::Target {
37-
&self.0
38-
}
39-
}
40-
41-
impl DerefMut for Accel {
42-
fn deref_mut(&mut self) -> &mut Self::Target {
43-
&mut self.0
44-
}
45-
}
46-
4713
// taken from winit's code base
4814
// https://github.com/rust-windowing/winit/blob/ee88e38f13fbc86a7aafae1d17ad3cd4a1e761df/src/platform_impl/windows/util.rs#L138
4915
pub fn get_instance_handle() -> windows_sys::Win32::Foundation::HMODULE {

0 commit comments

Comments
 (0)