diff options
| author | Daniel Jankowski <daniel.jankowski@rub.de> | 2023-12-17 12:33:34 +0100 |
|---|---|---|
| committer | Daniel Jankowski <daniel.jankowski@rub.de> | 2023-12-17 12:33:34 +0100 |
| commit | 5892df483ab50215dae01ab5d8fd3aae25b4baa0 (patch) | |
| tree | a214b76c26cc70971be4bc9dfbe95f54fac31a32 /src/widgets/datetime.rs | |
| parent | chore: refactor mode with more idiomatic rust (diff) | |
| download | sl0pstatus-5892df483ab50215dae01ab5d8fd3aae25b4baa0.tar.gz sl0pstatus-5892df483ab50215dae01ab5d8fd3aae25b4baa0.tar.xz sl0pstatus-5892df483ab50215dae01ab5d8fd3aae25b4baa0.zip | |
feat: refactor to lib and add benches
Diffstat (limited to 'src/widgets/datetime.rs')
| -rw-r--r-- | src/widgets/datetime.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/datetime.rs b/src/widgets/datetime.rs index 958b232..c75f816 100644 --- a/src/widgets/datetime.rs +++ b/src/widgets/datetime.rs @@ -5,7 +5,7 @@ use chrono_tz::Tz; use crate::render::FormattedPart; -use super::widget::Widget; +use crate::{config::ZellijState, widgets::widget::Widget}; pub struct DateTimeWidget { format: String, @@ -44,7 +44,7 @@ impl DateTimeWidget { } impl Widget for DateTimeWidget { - fn process(&self, _name: &str ,_state: crate::ZellijState) -> String { + fn process(&self, _name: &str ,_state: ZellijState) -> String { let mut output = self.color_format.content.clone(); if output.contains("{format}") { let date = Local::now(); @@ -63,5 +63,5 @@ impl Widget for DateTimeWidget { self.color_format.format_string(output) } - fn process_click(&self, _state: crate::ZellijState, _pos: usize) {} + fn process_click(&self, _state: ZellijState, _pos: usize) {} } |
