diff options
author | Fredrik Meringdal <fmeringdal@hotmail.com> | 2020-10-17 01:56:39 +0200 |
---|---|---|
committer | Fredrik Meringdal <fmeringdal@hotmail.com> | 2020-10-17 01:56:39 +0200 |
commit | d2fe9bf6fec3c273a785813ccf915816f8486d46 (patch) | |
tree | 90054001b04f52925d57ef1d80550b71451921b1 /src | |
parent | e508161cd3580888febaef4bbb848e219797e378 (diff) | |
download | rust_rrule-d2fe9bf6fec3c273a785813ccf915816f8486d46.zip |
some small fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/iter.rs | 4 | ||||
-rw-r--r-- | src/iterinfo.rs | 2 | ||||
-rw-r--r-- | src/options.rs | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/iter.rs b/src/iter.rs index 0581cc3..2673059 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -249,7 +249,9 @@ pub fn increment_counter_date( counter_date + Duration::days(day_delta as i64) } Frequenzy::DAILY => counter_date + Duration::days(options.interval as i64), - _ => panic!("hfoashfosa"), + Frequenzy::HOURLY => counter_date + Duration::hours(options.interval as i64), + Frequenzy::MINUTELY => counter_date + Duration::minutes(options.interval as i64), + Frequenzy::SECONDLY => counter_date + Duration::seconds(options.interval as i64), } } diff --git a/src/iterinfo.rs b/src/iterinfo.rs index dbc6e24..083d4fa 100644 --- a/src/iterinfo.rs +++ b/src/iterinfo.rs @@ -219,7 +219,7 @@ impl<'a> IterInfo<'a> { Frequenzy::MONTHLY => self.mdayset(month), Frequenzy::WEEKLY => self.wdayset(year, month, day), Frequenzy::DAILY => self.ddayset(year, month, day), - _ => panic!("Invalid freq"), + _ => self.ddayset(year, month, day), } } diff --git a/src/options.rs b/src/options.rs index 7b2a01e..30143c1 100644 --- a/src/options.rs +++ b/src/options.rs @@ -1,4 +1,3 @@ - use chrono::prelude::*; #[derive(Debug)] |