summaryrefslogtreecommitdiff
path: root/src/viewmodel/address.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/viewmodel/address.rs')
-rw-r--r--src/viewmodel/address.rs36
1 files changed, 18 insertions, 18 deletions
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<AddressView> for Address {
fn get_input_fields(&self, link: &ComponentLink<AddressView>) -> Vec<VCardPropertyInputField> {
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<AddressView> 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<AddressView> 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<AddressView> 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<AddressView> 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<AddressView> 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<AddressView> 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<AddressView> 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
+}