diff options
author | jelemux <jeremias.weber@protonmail.com> | 2021-02-09 23:18:45 +0100 |
---|---|---|
committer | jelemux <jeremias.weber@protonmail.com> | 2021-02-09 23:18:45 +0100 |
commit | 036a567bae8346eb38f9237f59645dbcc4f1cd8c (patch) | |
tree | 21a86e3c5cb8964030c414718190af12f3d26125 /src/view/telephone.rs | |
parent | 9df3ff8d633a18e934d4e62b0e2e718620760552 (diff) | |
download | wasm-card-036a567bae8346eb38f9237f59645dbcc4f1cd8c.tar.gz wasm-card-036a567bae8346eb38f9237f59645dbcc4f1cd8c.tar.bz2 |
switch to cargo-make; format files with rustfmt
Diffstat (limited to 'src/view/telephone.rs')
-rw-r--r-- | src/view/telephone.rs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/view/telephone.rs b/src/view/telephone.rs index dc93632..68389ba 100644 --- a/src/view/telephone.rs +++ b/src/view/telephone.rs @@ -1,28 +1,28 @@ +use super::VCardPropertyInputComponent; use crate::view::InputProps; -use yew::prelude::*; -use yewtil::NeqAssign; -use crate::viewmodel::Error; use crate::viewmodel::telephone::*; +use crate::viewmodel::Error; use crate::viewmodel::VCardPropertyInputObject; -use super::VCardPropertyInputComponent; +use yew::prelude::*; +use yewtil::NeqAssign; -type Props = InputProps<Telephone,TelephoneView>; +type Props = InputProps<Telephone, TelephoneView>; /// View Component for a `telephone` field -/// +/// /// # Examples -/// +/// /// ```compile_fail /// let html = html!{ -/// <TelephoneView weak_link=some_weak_component_link +/// <TelephoneView weak_link=some_weak_component_link /// generated=self.link.callback( -/// |n: Irc<Telephone>| +/// |n: Irc<Telephone>| /// Msg::GeneratedTelephone(some_telephone) /// ) /// /> /// }; /// ``` -#[derive(Clone,PartialEq)] +#[derive(Clone, PartialEq)] pub struct TelephoneView { props: Props, value: Telephone, @@ -85,13 +85,13 @@ impl Component for TelephoneView { }; true } - fn change(&mut self, props: <Self as yew::Component>::Properties) -> bool { + fn change(&mut self, props: <Self as yew::Component>::Properties) -> bool { self.props.neq_assign(props) } fn view(&self) -> yew::virtual_dom::VNode { let link = self.props.weak_link.borrow().clone().unwrap(); - html!{ + html! { <div class="box"> { self.render_error() } @@ -102,4 +102,4 @@ impl Component for TelephoneView { </div> } } -}
\ No newline at end of file +} |