refactor: remove panic-prone unwrap and expect calls

This commit is contained in:
lbl
2026-08-23 12:04:40 +08:00
parent 2100ec1ca5
commit c2fd1ff870
18 changed files with 161 additions and 128 deletions
+1 -2
View File
@@ -235,7 +235,7 @@ fn toggle_main_window(app: &AppHandle) {
}
}
pub fn run() {
pub fn run() -> Result<(), tauri::Error> {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![
api_request,
@@ -320,5 +320,4 @@ pub fn run() {
}
})
.run(tauri::generate_context!())
.expect("error while running VNT Desktop");
}
+2 -2
View File
@@ -1,3 +1,3 @@
fn main() {
vnt_desktop_lib::run();
fn main() -> Result<(), tauri::Error> {
vnt_desktop_lib::run()
}