fjordgard

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

commit 20ed9b4655d13a6b8711dcafca50bbdb02a04df4
parent dcf3a62233efda62d14d2d30e6dfc7e8211d19fc
Author: Sylvia Ivory <git@sivory.net>
Date:   Thu, 19 Jun 2025 19:41:54 -0700

Remove unnecessary clones

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

diff --git a/src/background.rs b/src/background.rs @@ -241,7 +241,7 @@ impl BackgroundHandle { let client = client.clone(); let photo = photo.clone(); - let size = self.size.clone(); + let size = self.size; Task::future(async move { client diff --git a/src/main.rs b/src/main.rs @@ -73,7 +73,7 @@ enum Message { impl Fjordgard { fn new() -> (Self, Task<Message>) { let settings = window::Settings::default(); - let main_window_size = settings.size.clone(); + let main_window_size = settings.size; let (id, open) = window::open(settings); let config = Config::default(); @@ -84,7 +84,7 @@ impl Fjordgard { .unwrap(); let meteo = MeteoClient::new(None).unwrap(); - let (background, task) = BackgroundHandle::new(&config, main_window_size.clone()); + let (background, task) = BackgroundHandle::new(&config, main_window_size); ( Self { @@ -184,7 +184,7 @@ impl Fjordgard { let background_task = self .background - .load_config(&config, self.main_window_size.clone()) + .load_config(&config, self.main_window_size) .map(Message::Background); let new_pair = config.location.as_ref().map(|l| (l.latitude, l.longitude)); @@ -318,7 +318,6 @@ impl Fjordgard { _ => 100, }; - // TODO; calculate icon Some(( format!("{temperature}{temperature_units} {condition_text}"), format!("icons/weather/{icon_condition}-{is_day}.svg"),