diff options
author | Fredrik Meringdal <fmeringdal@hotmail.com> | 2020-10-25 01:33:33 +0200 |
---|---|---|
committer | Fredrik Meringdal <fmeringdal@hotmail.com> | 2020-10-25 01:33:33 +0200 |
commit | 6acba0e4ee286a6412261a89ad15db01717ac8bc (patch) | |
tree | 98a553ad25a2a634112a0b146593e7099582df4c /src/iterinfo.rs | |
parent | ea7f196d627868a7cde403e35421a1f085d84b92 (diff) | |
download | rust_rrule-6acba0e4ee286a6412261a89ad15db01717ac8bc.zip |
small refactor
Diffstat (limited to 'src/iterinfo.rs')
-rw-r--r-- | src/iterinfo.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/iterinfo.rs b/src/iterinfo.rs index c0285f6..6f3044e 100644 --- a/src/iterinfo.rs +++ b/src/iterinfo.rs @@ -229,10 +229,10 @@ impl<'a> IterInfo<'a> { day: usize, ) -> (Vec<usize>, usize, usize) { match freq { - Frequenzy::YEARLY => self.ydayset(), - Frequenzy::MONTHLY => self.mdayset(month), - Frequenzy::WEEKLY => self.wdayset(year, month, day), - Frequenzy::DAILY => self.ddayset(year, month, day), + Frequenzy::Yearly => self.ydayset(), + Frequenzy::Monthly => self.mdayset(month), + Frequenzy::Weekly => self.wdayset(year, month, day), + Frequenzy::Daily => self.ddayset(year, month, day), _ => self.ddayset(year, month, day), } } @@ -246,9 +246,9 @@ impl<'a> IterInfo<'a> { millisecond: usize, ) -> Vec<Time> { match freq { - Frequenzy::HOURLY => self.htimeset(hour, minute, second, millisecond), - Frequenzy::MINUTELY => self.mtimeset(hour, minute, second, millisecond), - Frequenzy::SECONDLY => self.stimeset(hour, minute, second, millisecond), + Frequenzy::Hourly => self.htimeset(hour, minute, second, millisecond), + Frequenzy::Minutely => self.mtimeset(hour, minute, second, millisecond), + Frequenzy::Secondly => self.stimeset(hour, minute, second, millisecond), _ => panic!("Invalid freq"), } } |