From 51bf8e89ce07864b70d7138bbc3958faf499cc67 Mon Sep 17 00:00:00 2001 From: jelemux Date: Wed, 3 Feb 2021 07:08:49 +0100 Subject: now it compiles --- src/viewmodel/telephone.rs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'src/viewmodel/telephone.rs') diff --git a/src/viewmodel/telephone.rs b/src/viewmodel/telephone.rs index e5f63f0..6c930a2 100644 --- a/src/viewmodel/telephone.rs +++ b/src/viewmodel/telephone.rs @@ -1,11 +1,9 @@ -use std::collections::HashSet; use super::*; use crate::view::telephone::*; -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct Telephone { pub number: String, - pub extension: String, pub work: bool, pub home: bool, pub text: bool, @@ -21,7 +19,6 @@ impl VCardPropertyInputObject for Telephone { fn new() -> Self { Self { number: String::new(), - extension: String::new(), work: false, home: false, text: false, @@ -42,13 +39,6 @@ impl VCardPropertyInputObject for Telephone { oninput: link.callback(|e: InputData| Msg::UpdateNumber(e.value)), value: self.number.clone(), }, - VCardPropertyInputField::Text{ - label: "Extension".to_string(), - id: Some("extension".to_string()), - placeholder: None, - oninput: link.callback(|e: InputData| Msg::UpdateExtension(e.value)), - value: self.extension.clone(), - }, VCardPropertyInputField::CheckBox{ label: "Work".to_string(), id: Some("work".to_string()), @@ -106,7 +96,6 @@ impl VCardPropertyInputObject for Telephone { ] } fn is_empty(&self) -> bool { - self.number.is_empty() && - self.extension.is_empty() + self.number.is_empty() } } \ No newline at end of file -- cgit v1.2.3