diff --git a/.changes/compile-without-common-controls.md b/.changes/compile-without-common-controls.md new file mode 100644 index 000000000..2237e97c2 --- /dev/null +++ b/.changes/compile-without-common-controls.md @@ -0,0 +1,5 @@ +--- +tauri-runtime-wry: 'patch:bug' +--- + +Fixed a compile error when using tauri without the `common-controls-v6` feature enabled. diff --git a/crates/tauri-runtime-wry/src/dialog/windows.rs b/crates/tauri-runtime-wry/src/dialog/windows.rs index 137371ef9..2f520c563 100644 --- a/crates/tauri-runtime-wry/src/dialog/windows.rs +++ b/crates/tauri-runtime-wry/src/dialog/windows.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use windows::core::{w, HSTRING, PCWSTR}; +use windows::core::{w, HSTRING}; enum Level { Error, @@ -33,7 +33,7 @@ fn dialog_inner(err: &str, level: Level) { unsafe { MessageBoxW( None, - err, + &err, title, match level { Level::Warning => MB_ICONWARNING, @@ -46,7 +46,7 @@ fn dialog_inner(err: &str, level: Level) { #[cfg(feature = "common-controls-v6")] { - use windows::core::HRESULT; + use windows::core::{HRESULT, PCWSTR}; use windows::Win32::Foundation::*; use windows::Win32::UI::Controls::*; use windows::Win32::UI::Shell::*;