diff options
Diffstat (limited to 'src/gui/form')
-rw-r--r-- | src/gui/form/mod.rs | 2 | ||||
-rw-r--r-- | src/gui/form/utils.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/form/mod.rs b/src/gui/form/mod.rs index e05bb78..197bc14 100644 --- a/src/gui/form/mod.rs +++ b/src/gui/form/mod.rs @@ -186,7 +186,7 @@ pub async fn show(app: &App, target: Target) { .collect::<Vec<&str>>(), ); category_dropdown.set_margin_bottom(10); - let selected = get_selected_category(&event, &app.categories).unwrap_or_else(|| "".to_string()); + let selected = get_selected_category(&event, &app.categories).unwrap_or_default(); category_dropdown.set_selected( dropdown_categories .iter() diff --git a/src/gui/form/utils.rs b/src/gui/form/utils.rs index 5cf59e3..d0b4806 100644 --- a/src/gui/form/utils.rs +++ b/src/gui/form/utils.rs @@ -5,7 +5,7 @@ use chrono::NaiveTime; use crate::model::time; pub fn time_entry(time: Option<NaiveTime>) -> gtk::Entry { - entry(&time.map(time::pprint).unwrap_or_else(|| "".to_string())) + entry(&time.map(time::pprint).unwrap_or_default()) } pub fn entry(text: &str) -> gtk::Entry { |