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/telephone.rs | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/viewmodel/telephone.rs') diff --git a/src/viewmodel/telephone.rs b/src/viewmodel/telephone.rs index ee616c3..44b938f 100644 --- a/src/viewmodel/telephone.rs +++ b/src/viewmodel/telephone.rs @@ -30,10 +30,13 @@ impl VCardPropertyInputObject for Telephone { text_phone: false, } } - fn get_input_fields(&self, link: &ComponentLink) -> Vec { + fn get_input_fields( + &self, + link: &ComponentLink, + ) -> Vec { let typ = String::from("tel"); vec![ - VCardPropertyInputField::Text{ + VCardPropertyInputField::Text { label: "Number".to_string(), id: Some("number".to_string()), placeholder: None, @@ -41,55 +44,55 @@ impl VCardPropertyInputObject for Telephone { value: self.number.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), value: self.home, }, - VCardPropertyInputField::CheckBox{ + VCardPropertyInputField::CheckBox { label: "Text".to_string(), id: Some("text".to_string()), onclick: link.callback(|_: MouseEvent| Msg::ToggleText), value: self.text, }, - VCardPropertyInputField::CheckBox{ + VCardPropertyInputField::CheckBox { label: "Voice".to_string(), id: Some("voice".to_string()), onclick: link.callback(|_: MouseEvent| Msg::ToggleVoice), value: self.voice, }, - VCardPropertyInputField::CheckBox{ + VCardPropertyInputField::CheckBox { label: "Fax".to_string(), id: Some("fax".to_string()), onclick: link.callback(|_: MouseEvent| Msg::ToggleFax), value: self.fax, }, - VCardPropertyInputField::CheckBox{ + VCardPropertyInputField::CheckBox { label: "Cell".to_string(), id: Some("cell".to_string()), onclick: link.callback(|_: MouseEvent| Msg::ToggleCell), value: self.cell, }, - VCardPropertyInputField::CheckBox{ + VCardPropertyInputField::CheckBox { label: "Video".to_string(), id: Some("video".to_string()), onclick: link.callback(|_: MouseEvent| Msg::ToggleVideo), value: self.video, }, - VCardPropertyInputField::CheckBox{ + VCardPropertyInputField::CheckBox { label: "Pager".to_string(), id: Some("pager".to_string()), onclick: link.callback(|_: MouseEvent| Msg::TogglePager), value: self.pager, }, - VCardPropertyInputField::CheckBox{ + VCardPropertyInputField::CheckBox { label: "Text Phone".to_string(), id: Some("text_phone".to_string()), onclick: link.callback(|_: MouseEvent| Msg::ToggleTextPhone), @@ -100,4 +103,4 @@ impl VCardPropertyInputObject for Telephone { fn is_empty(&self) -> bool { self.number.is_empty() } -} \ No newline at end of file +} -- cgit v1.2.3