From fe85652e4d3e8906824baddaafd05d19105579b8 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Mon, 25 Aug 2025 16:35:45 +0000 Subject: task-072 Co-authored-by: Joe Carstairs Reviewed-on: https://git.joeac.net/joeac/schist/pulls/3 Co-authored-by: Joe Carstairs Co-committed-by: Joe Carstairs --- .../src/gui/components/bucket_name_and_balance.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs') diff --git a/schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs b/schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs index db3fc2e..24a3952 100644 --- a/schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs +++ b/schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs @@ -1,10 +1,7 @@ -use iced::{ - widget::{row, text}, - Element, -}; +use iced::{widget::row, Element}; use schist_models::Bucket; -use crate::gui::components::navigation; +use crate::gui::components::{navigation, Text}; #[derive(Clone, Debug, PartialEq)] pub struct BucketNameAndBalance { @@ -20,8 +17,8 @@ impl BucketNameAndBalance { impl<'a> Into>> for BucketNameAndBalance { fn into(self) -> Element<'a, navigation::Message> { row![ - text(self.bucket.name.clone()), - text(self.bucket.balance.unwrap_or(0)) + Text::new(&self.bucket.name).as_element(), + Text::new(&self.bucket.balance.unwrap_or(0).to_string()).as_element(), ] .into() } -- cgit v1.2.3