From 8b062ddeb1143e6894653274a524b63dc7c5b165 Mon Sep 17 00:00:00 2001 From: Fredrik Meringdal Date: Tue, 20 Oct 2020 23:36:32 +0200 Subject: checkpoint! Refactored more and tests pass --- src/rrule.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/rrule.rs') diff --git a/src/rrule.rs b/src/rrule.rs index 53ccf39..0b7ad6b 100644 --- a/src/rrule.rs +++ b/src/rrule.rs @@ -1,3 +1,4 @@ +use crate::iter_set::iter_v2; use crate::iter::*; use crate::options::*; use chrono::prelude::*; @@ -9,6 +10,7 @@ pub struct RRule { pub options: ParsedOptions, } + impl RRule { pub fn new(options: ParsedOptions) -> Self { Self { @@ -30,7 +32,7 @@ impl RRule { }; let mut iter_res = IterResult::new(QueryMethodTypes::ALL, iter_args); - let res = iter(&mut iter_res, &mut self.options); + let res = iter_v2(&mut iter_res, &mut self.options); res } @@ -48,7 +50,7 @@ impl RRule { }; let mut iter_res = IterResult::new(QueryMethodTypes::ALL, iter_args); - let res = iter(&mut iter_res, &mut self.options); + let res = iter_v2(&mut iter_res, &mut self.options); res } } -- cgit v1.2.3