fjordgard

A desktop clock application
Log | Files | Refs | README | LICENSE

commit 203e97dee608c460c4c5b68d8e1d9ab1621f2539
parent ad5d03c22b3cf88318aa62d8a1b571723be060ce
Author: Sylvia Ivory <git@sivory.net>
Date:   Wed, 18 Jun 2025 23:00:02 -0700

Cleanup clippy warnings

Diffstat:
Msrc/main.rs | 2+-
Msrc/settings.rs | 5++---
2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -99,7 +99,7 @@ impl Fjordgard { if &self.format_string != config_format { self.format_string = config_format.clone(); - self.format_parsed = StrftimeItems::new_lenient(&config_format) + self.format_parsed = StrftimeItems::new_lenient(config_format) .parse_to_owned() .unwrap(); } diff --git a/src/settings.rs b/src/settings.rs @@ -77,8 +77,7 @@ impl Settings { .unwrap_or_default(); let name = location .as_ref() - .map(|l| l.name.clone()) - .flatten() + .and_then(|l| l.name.clone()) .unwrap_or_default(); let location = location .as_ref() @@ -273,7 +272,7 @@ impl Settings { row![text(self.background_mode.edit_text()).width(Length::FillPortion(1))]; if self.background_mode == BackgroundMode::Local { - let text = if self.background == "" { + let text = if self.background.is_empty() { "Select file..." } else { &self.background