From 036a567bae8346eb38f9237f59645dbcc4f1cd8c Mon Sep 17 00:00:00 2001 From: jelemux Date: Tue, 9 Feb 2021 23:18:45 +0100 Subject: switch to cargo-make; format files with rustfmt --- src/viewmodel/dates.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/viewmodel/dates.rs') 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 for Dates { birthday: String::new(), } } - fn get_input_fields(&self, link: &yew::html::Scope) -> std::vec::Vec { + fn get_input_fields( + &self, + link: &yew::html::Scope, + ) -> std::vec::Vec { 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 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 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 +} -- cgit v1.2.3