Merge pull request #186 from kasugamirai/chore

feat: Refactor code to improve error handling and readability
This commit is contained in:
雨宮蓮
2024-05-10 07:13:32 +07:00
committed by GitHub
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(())