From 365e8d37f1d97bc2f0f062f4594fbae1a90be93a Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Tue, 19 May 2020 11:27:21 +0200 Subject: Set the actual duration for the end of the event --- src/calendar.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calendar.rs b/src/calendar.rs index a46795b..303a2f8 100644 --- a/src/calendar.rs +++ b/src/calendar.rs @@ -109,7 +109,7 @@ fn duration(value: &str) -> Result { let mut acc = "".to_string(); for c in value.chars() { match c { - '0'...'9' => acc.push(c), + '0'..='9' => acc.push(c), '-' => duration = -duration, 'W' | 'H' | 'M' | 'S' | 'D' => { let count = acc.parse()?; @@ -127,5 +127,5 @@ fn duration(value: &str) -> Result { _ => (), } } - Ok(Duration::weeks(1)) + Ok(duration) } -- cgit v1.2.3