diff options
| author | Joe Carstairs <me@joeac.net> | 2025-08-25 16:35:45 +0000 |
|---|---|---|
| committer | joeac <me@joeac.net> | 2025-08-25 16:35:45 +0000 |
| commit | fe85652e4d3e8906824baddaafd05d19105579b8 (patch) | |
| tree | 31b56e31cbf289a34ec1d6707becf3c60933b56f /schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs | |
| parent | d082a30de6a0cbd1fbe2ab5a4316db0891004129 (diff) | |
task-072
Co-authored-by: Joe Carstairs <jcarstairs@scottlogic.com>
Reviewed-on: https://git.joeac.net/joeac/schist/pulls/3
Co-authored-by: Joe Carstairs <me@joeac.net>
Co-committed-by: Joe Carstairs <me@joeac.net>
Diffstat (limited to 'schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs')
| -rw-r--r-- | schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs | 11 |
1 files changed, 4 insertions, 7 deletions
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<Element<'a, navigation::Message<BucketNameAndBalance>>> for BucketNameAndBalance { fn into(self) -> Element<'a, navigation::Message<BucketNameAndBalance>> { 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() } |
