diff options
Diffstat (limited to 'src/viewmodel/dates.rs')
-rw-r--r-- | src/viewmodel/dates.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/viewmodel/dates.rs b/src/viewmodel/dates.rs index 28e8bad..7d8d394 100644 --- a/src/viewmodel/dates.rs +++ b/src/viewmodel/dates.rs @@ -1,5 +1,5 @@ -use crate::view::dates::*; use super::*; +use crate::view::dates::*; /// Type that represents the vcard `anniversary` and `birthday` properties. #[derive(Clone, Debug, PartialEq)] @@ -15,10 +15,13 @@ impl VCardPropertyInputObject<DatesView> for Dates { birthday: String::new(), } } - fn get_input_fields(&self, link: &yew::html::Scope<DatesView>) -> std::vec::Vec<VCardPropertyInputField> { + fn get_input_fields( + &self, + link: &yew::html::Scope<DatesView>, + ) -> std::vec::Vec<VCardPropertyInputField> { let typ = String::from("date"); vec![ - VCardPropertyInputField::Text{ + VCardPropertyInputField::Text { label: "Anniversary".to_string(), id: Some("anniversary".to_string()), placeholder: None, @@ -26,7 +29,7 @@ impl VCardPropertyInputObject<DatesView> for Dates { value: self.anniversary.clone(), typ: typ.clone(), }, - VCardPropertyInputField::Text{ + VCardPropertyInputField::Text { label: "Birthday".to_string(), id: Some("birthday".to_string()), placeholder: None, @@ -37,7 +40,6 @@ impl VCardPropertyInputObject<DatesView> for Dates { ] } fn is_empty(&self) -> bool { - self.anniversary.is_empty() - && self.birthday.is_empty() + self.anniversary.is_empty() && self.birthday.is_empty() } -}
\ No newline at end of file +} |