Skip to content

Commit aef927b

Browse files
committed
chore(deps): update raw-window-handle to 0.5
1 parent f38bc23 commit aef927b

3 files changed

Lines changed: 14 additions & 10 deletions

File tree

.changes/raw-window-handle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"window-vibrancy": "minor"
3+
---
4+
5+
Update `raw-window-handle` dependency to 0.5

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
[package]
22
name = "window-vibrancy"
33
description = "Make your windows vibrant."
4-
authors = [ "Tauri Programme within The Commons Conservancy" ]
4+
authors = ["Tauri Programme within The Commons Conservancy"]
55
version = "0.1.3"
66
edition = "2021"
77
rust-version = "1.56"
88
license = "Apache-2.0 OR MIT"
99
readme = "README.md"
1010
repository = "https://github.com/tauri-apps/tauri-plugin-vibrancy"
1111
documentation = "https://docs.rs/tauri-plugin-vibrancy"
12-
keywords = [ "vibrancy", "acrylic", "mica", "blur", "windowing" ]
13-
categories = [ "gui" ]
12+
keywords = ["vibrancy", "acrylic", "mica", "blur", "windowing"]
13+
categories = ["gui"]
1414

1515
[package.metadata.docs.rs]
1616
default-target = "x86_64-pc-windows-msvc"
17-
targets = [ "x86_64-apple-darwin", "x86_64-pc-windows-msvc" ]
17+
targets = ["x86_64-apple-darwin", "x86_64-pc-windows-msvc"]
1818

1919
[dependencies]
20-
raw-window-handle = "0.4"
20+
raw-window-handle = "0.5"
2121

2222
[dev-dependencies]
2323
tao = "0.12"
@@ -31,7 +31,7 @@ features = [
3131
"Win32_System_SystemInformation",
3232
"Win32_Graphics_Gdi",
3333
"Win32_Graphics_Dwm",
34-
"Win32_UI_WindowsAndMessaging"
34+
"Win32_UI_WindowsAndMessaging",
3535
]
3636

3737
[target."cfg(target_os = \"macos\")".dependencies]

src/windows.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,15 @@ fn get_function_impl(library: &str, function: &str) -> Option<FARPROC> {
158158

159159
macro_rules! get_function {
160160
($lib:expr, $func:ident) => {
161-
get_function_impl(concat!($lib, '\0'), concat!(stringify!($func), '\0')).map(|f| unsafe {
162-
std::mem::transmute::<::windows_sys::Win32::Foundation::FARPROC, $func>(f)
163-
})
161+
get_function_impl(concat!($lib, '\0'), concat!(stringify!($func), '\0'))
162+
.map(|f| std::mem::transmute::<::windows_sys::Win32::Foundation::FARPROC, $func>(f))
164163
};
165164
}
166165

167166
/// Returns a tuple of (major, minor, buildnumber)
168167
fn get_windows_ver() -> Option<(u32, u32, u32)> {
169168
type RtlGetVersion = unsafe extern "system" fn(*mut OSVERSIONINFOW) -> i32;
170-
let handle = get_function!("ntdll.dll", RtlGetVersion);
169+
let handle = unsafe { get_function!("ntdll.dll", RtlGetVersion) };
171170
if let Some(rtl_get_version) = handle {
172171
unsafe {
173172
let mut vi = OSVERSIONINFOW {

0 commit comments

Comments
 (0)