mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-01 02:31:04 +02:00
refactor: standardise error messages
This commit is contained in:
parent
fd2d7e5c7a
commit
9d5049dde0
19 changed files with 117 additions and 110 deletions
|
@ -1,4 +1,5 @@
|
|||
use crate::config::CommonConfig;
|
||||
use crate::error;
|
||||
use crate::modules::{Module, ModuleInfo, ModuleUpdateEvent, ModuleWidget, WidgetContext};
|
||||
use crate::popup::Popup;
|
||||
use chrono::{DateTime, Local};
|
||||
|
@ -48,7 +49,7 @@ impl Module<Button> for ClockModule {
|
|||
let date = Local::now();
|
||||
tx.send(ModuleUpdateEvent::Update(date))
|
||||
.await
|
||||
.expect("Failed to send date");
|
||||
.expect(error::ERR_CHANNEL_SEND);
|
||||
sleep(tokio::time::Duration::from_millis(500)).await;
|
||||
}
|
||||
});
|
||||
|
@ -74,7 +75,7 @@ impl Module<Button> for ClockModule {
|
|||
button,
|
||||
orientation,
|
||||
)))
|
||||
.expect("Failed to toggle popup");
|
||||
.expect(error::ERR_CHANNEL_SEND);
|
||||
});
|
||||
|
||||
let format = self.format.clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue