Skip to content

Commit cfc8f31

Browse files
authored
Merge pull request #79 from alley-rs/dev
chore: lib run 中使用 except 捕获异常
2 parents a0ec019 + cfe8c4a commit cfc8f31

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed

src-tauri/src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ async fn show_main_window(app: AppHandle) {
406406
}
407407

408408
#[cfg_attr(mobile, tauri::mobile_entry_point)]
409-
pub fn run() -> HunterResult<()> {
409+
pub fn run() {
410410
setup_logging();
411411

412412
trace!("初始化 tauri");
@@ -456,8 +456,7 @@ pub fn run() -> HunterResult<()> {
456456
.map_err(|e| {
457457
error!(message = "创建 app 失败", error = ?e);
458458
e
459-
})?
459+
})
460+
.expect("Error while running tauri application")
460461
.run(handle_run_event);
461-
462-
Ok(())
463462
}

src-tauri/src/utils/fs.rs

Lines changed: 0 additions & 15 deletions
This file was deleted.

src-tauri/src/utils/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
pub mod download;
22
pub mod execute;
3-
pub mod fs;
43
pub mod unzip;
54

65
use reqwest::{Client, Proxy};

0 commit comments

Comments
 (0)