From 50659f54d7afb321a9fac88c954652b975f0b370 Mon Sep 17 00:00:00 2001 From: Tony Date: Mon, 9 Dec 2024 16:10:08 +0800 Subject: [PATCH] Add missing `Ok(())` and `?` --- plugins/opener/README.md | 7 ++++--- plugins/store/README.md | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/opener/README.md b/plugins/opener/README.md index d95d6039..ca81995c 100644 --- a/plugins/opener/README.md +++ b/plugins/opener/README.md @@ -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!()) diff --git a/plugins/store/README.md b/plugins/store/README.md index a285de3f..8a2fcbf7 100644 --- a/plugins/store/README.md +++ b/plugins/store/README.md @@ -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");