From 5a7a41849a9bdd2e92addeb74c178ef713adeb2d Mon Sep 17 00:00:00 2001 From: Fredrik Meringdal Date: Sun, 7 Feb 2021 14:57:54 +0100 Subject: recatoring --- src/rruleset_iter.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/rruleset_iter.rs b/src/rruleset_iter.rs index 757da18..7b83f39 100644 --- a/src/rruleset_iter.rs +++ b/src/rruleset_iter.rs @@ -5,7 +5,7 @@ use chrono_tz::Tz; use std::collections::HashMap; use std::iter::Iterator; -pub struct RRuleIterSet { +pub struct RRuleSetIter { pub queue: HashMap>, pub rrule_iters: Vec, pub exrules: Vec, @@ -14,7 +14,7 @@ pub struct RRuleIterSet { pub rdates: Vec>, } -impl Iterator for RRuleIterSet { +impl Iterator for RRuleSetIter { type Item = DateTime; fn next(&mut self) -> Option { @@ -142,12 +142,12 @@ fn accept_generated_date( impl IntoIterator for RRuleSet { type Item = DateTime; - type IntoIter = RRuleIterSet; + type IntoIter = RRuleSetIter; fn into_iter(mut self) -> Self::IntoIter { // Sort in decreasing order self.rdate.sort_by(|d1, d2| d2.partial_cmp(d1).unwrap()); - RRuleIterSet { + RRuleSetIter { queue: Default::default(), rrule_iters: self .rrule -- cgit v1.2.3