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/address.rs | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/viewmodel/address.rs') diff --git a/src/viewmodel/address.rs b/src/viewmodel/address.rs index 71cc8d3..9542675 100644 --- a/src/viewmodel/address.rs +++ b/src/viewmodel/address.rs @@ -31,15 +31,15 @@ impl VCardPropertyInputObject for Address { fn get_input_fields(&self, link: &ComponentLink) -> Vec { let typ = String::from("text"); vec![ - VCardPropertyInputField::Text{ + VCardPropertyInputField::Text { label: "Post Office Box".to_string(), id: Some("post_office_box".to_string()), placeholder: None, oninput: link.callback(|e: InputData| Msg::UpdatePostOfficeBox(e.value)), value: self.post_office_box.clone(), - typ: typ.clone(), + typ: typ.clone(), }, - VCardPropertyInputField::Text{ + VCardPropertyInputField::Text { label: "Extension".to_string(), id: Some("extension".to_string()), placeholder: None, @@ -47,7 +47,7 @@ impl VCardPropertyInputObject for Address { value: self.extension.clone(), typ: typ.clone(), }, - VCardPropertyInputField::Text{ + VCardPropertyInputField::Text { label: "Street".to_string(), id: Some("street".to_string()), placeholder: None, @@ -55,7 +55,7 @@ impl VCardPropertyInputObject for Address { value: self.street.clone(), typ: typ.clone(), }, - VCardPropertyInputField::Text{ + VCardPropertyInputField::Text { label: "Locality".to_string(), id: Some("locality".to_string()), placeholder: None, @@ -63,7 +63,7 @@ impl VCardPropertyInputObject for Address { value: self.locality.clone(), typ: typ.clone(), }, - VCardPropertyInputField::Text{ + VCardPropertyInputField::Text { label: "Region".to_string(), id: Some("region".to_string()), placeholder: None, @@ -71,7 +71,7 @@ impl VCardPropertyInputObject for Address { value: self.region.clone(), typ: typ.clone(), }, - VCardPropertyInputField::Text{ + VCardPropertyInputField::Text { label: "Code".to_string(), id: Some("code".to_string()), placeholder: None, @@ -79,7 +79,7 @@ impl VCardPropertyInputObject for Address { value: self.code.clone(), typ: typ.clone(), }, - VCardPropertyInputField::Text{ + VCardPropertyInputField::Text { label: "Country".to_string(), id: Some("country".to_string()), placeholder: None, @@ -87,13 +87,13 @@ impl VCardPropertyInputObject for Address { value: self.country.clone(), typ, }, - VCardPropertyInputField::CheckBox{ + VCardPropertyInputField::CheckBox { label: "Work".to_string(), id: Some("work".to_string()), onclick: link.callback(|_: MouseEvent| Msg::ToggleWork), value: self.work, }, - VCardPropertyInputField::CheckBox{ + VCardPropertyInputField::CheckBox { label: "Home".to_string(), id: Some("home".to_string()), onclick: link.callback(|_: MouseEvent| Msg::ToggleHome), @@ -102,12 +102,12 @@ impl VCardPropertyInputObject for Address { ] } fn is_empty(&self) -> bool { - self.post_office_box.is_empty() && - self.extension.is_empty() && - self.street.is_empty() && - self.locality.is_empty() && - self.region.is_empty() && - self.code.is_empty() && - self.country.is_empty() + self.post_office_box.is_empty() + && self.extension.is_empty() + && self.street.is_empty() + && self.locality.is_empty() + && self.region.is_empty() + && self.code.is_empty() + && self.country.is_empty() } -} \ No newline at end of file +} -- cgit v1.2.3