feat: Refactor code to improve error handling and readability

This commit is contained in:
xy
2024-05-09 19:09:55 +09:00
parent c8e1b8b8bd
commit 8c0d03aed0
6 changed files with 21 additions and 24 deletions

View File

@@ -34,7 +34,7 @@ fn main() {
// Setup app tray
let handle = app.handle().clone();
let _ = tray::create_tray(app.handle()).unwrap();
tray::create_tray(app.handle()).unwrap();
// Create data folder if not exist
let home_dir = app.path().home_dir().unwrap();
@@ -65,9 +65,7 @@ fn main() {
client.connect().await;
// Update global state
handle.manage(Nostr {
client: client.into(),
})
handle.manage(Nostr { client })
});
Ok(())