refactor format (#16)

This commit is contained in:
Jens K.
2024-12-18 08:29:07 +01:00
committed by GitHub
parent 8ddbc77baf
commit 3e278d63c5
3 changed files with 189 additions and 166 deletions

View File

@@ -70,8 +70,7 @@ impl StatefulWidget for CountdownWidget {
type State = Countdown;
fn render(self, area: Rect, buf: &mut Buffer, state: &mut Self::State) {
let clock = ClockWidget::new();
let headline = "Countdown".to_uppercase();
let label = Line::raw((format!("{} {}", headline, state.clock.get_mode())).to_uppercase());
let label = Line::raw((format!("Countdown {}", state.clock.get_mode())).to_uppercase());
let area = center(
area,