Rust complains with required type annotations when passing None as parent window to dialog::message #2471
Answered
by
Blakeinstein
Blakeinstein
asked this question in
Q&A
-
When passing None as the parent_window reference, rust complains for missing type annotations. Here is the complete error. message(None, "Error parsing default config", err.to_string())
type annotations needed
cannot satisfy `_: tauri::Runtime`rustcE0283
main.rs(1, 1): required by a bound in this
dialog.rs(167, 19): required by this bound in `message`
settings.rs(30, 14): consider specifying the type arguments in the function call: `::<R, impl AsRef<str>, impl AsRef<str>>` |
Beta Was this translation helpful? Give feedback.
Answered by
Blakeinstein
Aug 17, 2021
Replies: 1 comment
-
The solution is to use tauri's None as message(Option::<&tauri::Window<tauri::Wry>>::None, "Error parsing default config", err.to_string()) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Blakeinstein
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The solution is to use tauri's None as
Option::<&tauri::Window<tauri::Wry>>::None