diff options
Diffstat (limited to 'src/gui/form')
-rw-r--r-- | src/gui/form/mod.rs | 8 | ||||
-rw-r--r-- | src/gui/form/repetition.rs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/form/mod.rs b/src/gui/form/mod.rs index 197bc14..a14fb82 100644 --- a/src/gui/form/mod.rs +++ b/src/gui/form/mod.rs @@ -256,10 +256,10 @@ pub async fn show(app: &App, target: Target) { match event::validate( id, - date.buffer().text().to_string(), - name.buffer().text().to_string(), - start.buffer().text().to_string(), - end.buffer().text().to_string(), + &date.buffer().text(), + &name.buffer().text(), + &start.buffer().text(), + &end.buffer().text(), repetition, category, ) { diff --git a/src/gui/form/repetition.rs b/src/gui/form/repetition.rs index 4ed9803..6e7a13f 100644 --- a/src/gui/form/repetition.rs +++ b/src/gui/form/repetition.rs @@ -195,7 +195,7 @@ pub fn validate( // Check until let until = (if frequency.is_some() { - match validation::non_empty(model.until.buffer().text().to_string()) { + match validation::non_empty(&model.until.buffer().text()) { Some(until) => match NaiveDate::parse_from_str(&until, event::DATE_FORMAT) { Ok(until) => Ok(Some(until)), Err(_) => Err(format!("Can’t parse date from {}", until)), |