Add missing `Ok(())` and `?`

pull/2167/head
Tony 8 months ago
parent b3084300de
commit 50659f54d7
No known key found for this signature in database
GPG Key ID: 34BDD3EA27824956

@ -97,9 +97,10 @@ fn main() {
tauri::Builder::default()
.setup(|app| {
let opener = app.opener();
opener.open_url("https://example.com", Some("firefox"));
opener.open_path("/path/to/file", Some("firefox"));
opener.reveal_item_in_dir("/path/to/file");
opener.open_url("https://example.com", Some("firefox"))?;
opener.open_path("/path/to/file", Some("firefox"))?;
opener.reveal_item_in_dir("/path/to/file")?;
Ok(())
})
.plugin(tauri_plugin_opener::init())
.run(tauri::generate_context!())

@ -128,6 +128,7 @@ fn main() {
// Note that values must be serde_json::Value instances,
// otherwise, they will not be compatible with the JavaScript bindings.
store.set("a".to_string(), json!("b"));
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running tauri application");

Loading…
Cancel
Save