Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion crates/tauri-runtime-wry/src/dialog/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#[cfg(windows)]
mod windows;

pub fn error<S: AsRef<str>>(err: S) {
// Takes a `&'static str` here since we convert clickable hyperlinks,
// DO NOT pass in untrusted input
pub fn error(err: &'static str) {
#[cfg(windows)]
windows::error(err);

Expand Down
4 changes: 2 additions & 2 deletions crates/tauri-runtime-wry/src/dialog/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ enum Level {
Info,
}

pub fn error<S: AsRef<str>>(err: S) {
dialog_inner(err.as_ref(), Level::Error);
pub fn error(err: &'static str) {
dialog_inner(err, Level::Error);
}

fn dialog_inner(err: &str, level: Level) {
Expand Down
Loading