summaryrefslogtreecommitdiff
path: root/src/viewmodel/dates.rs
diff options
context:
space:
mode:
authorjelemux <jeremias.weber@protonmail.com>2021-02-09 23:18:45 +0100
committerjelemux <jeremias.weber@protonmail.com>2021-02-09 23:18:45 +0100
commit036a567bae8346eb38f9237f59645dbcc4f1cd8c (patch)
tree21a86e3c5cb8964030c414718190af12f3d26125 /src/viewmodel/dates.rs
parent9df3ff8d633a18e934d4e62b0e2e718620760552 (diff)
downloadwasm-card-036a567bae8346eb38f9237f59645dbcc4f1cd8c.tar.gz
wasm-card-036a567bae8346eb38f9237f59645dbcc4f1cd8c.tar.bz2
switch to cargo-make; format files with rustfmt
Diffstat (limited to 'src/viewmodel/dates.rs')
-rw-r--r--src/viewmodel/dates.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/viewmodel/dates.rs b/src/viewmodel/dates.rs
index 28e8bad..7d8d394 100644
--- a/src/viewmodel/dates.rs
+++ b/src/viewmodel/dates.rs
@@ -1,5 +1,5 @@
-use crate::view::dates::*;
use super::*;
+use crate::view::dates::*;
/// Type that represents the vcard `anniversary` and `birthday` properties.
#[derive(Clone, Debug, PartialEq)]
@@ -15,10 +15,13 @@ impl VCardPropertyInputObject<DatesView> for Dates {
birthday: String::new(),
}
}
- fn get_input_fields(&self, link: &yew::html::Scope<DatesView>) -> std::vec::Vec<VCardPropertyInputField> {
+ fn get_input_fields(
+ &self,
+ link: &yew::html::Scope<DatesView>,
+ ) -> std::vec::Vec<VCardPropertyInputField> {
let typ = String::from("date");
vec![
- VCardPropertyInputField::Text{
+ VCardPropertyInputField::Text {
label: "Anniversary".to_string(),
id: Some("anniversary".to_string()),
placeholder: None,
@@ -26,7 +29,7 @@ impl VCardPropertyInputObject<DatesView> for Dates {
value: self.anniversary.clone(),
typ: typ.clone(),
},
- VCardPropertyInputField::Text{
+ VCardPropertyInputField::Text {
label: "Birthday".to_string(),
id: Some("birthday".to_string()),
placeholder: None,
@@ -37,7 +40,6 @@ impl VCardPropertyInputObject<DatesView> for Dates {
]
}
fn is_empty(&self) -> bool {
- self.anniversary.is_empty()
- && self.birthday.is_empty()
+ self.anniversary.is_empty() && self.birthday.is_empty()
}
-} \ No newline at end of file
+}