-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
So the error type given doesn't match the error type that is received from your It expects to see a type: I think this is basically saying to try something like: tauri::Builder::default()
.setup(|app| {
create_cache_dir().map_err(|e| {
app.emit("err-msg", format!("create cache dir failed!"))
.unwrap();
e.into() // nifty way to convert the error type into Box<dyn std::error::Error>
})?;
Ok(())
})
.plugin(tauri_plugin_opener::init())
.invoke_handler(tauri::generate_handler![add, add_new_task])
.run(tauri::generate_context!())
.expect("error while running tauri application"); This is just wrapping your original error type (the type that was not expected) in a new error type format that is acceptable to be received. The P.S. nice luffy profile pic, love one piece |
Beta Was this translation helpful? Give feedback.
So the error type given doesn't match the error type that is received from your
create_cache_dir()
It expects to see a type:
Result<(), Box<dyn std::error::Error>>
but gets:
Result<(), anyhow::Error>
I think this is basically saying to try something like: