diff options
author | Fredrik Meringdal <fmeringdal@hotmail.com> | 2020-10-16 01:31:17 +0200 |
---|---|---|
committer | Fredrik Meringdal <fmeringdal@hotmail.com> | 2020-10-16 01:31:17 +0200 |
commit | 9e5742a46211fbf4cb33e32082febb5932b5ad3e (patch) | |
tree | 02a73c9e7a52a251371659eaee08ca63c0a4d3cb /src/iter.rs | |
parent | 81a3af0630bf43931862f117b8e30d1989a7aa45 (diff) | |
download | rust_rrule-9e5742a46211fbf4cb33e32082febb5932b5ad3e.zip |
more tests and some bug fixes
Diffstat (limited to 'src/iter.rs')
-rw-r--r-- | src/iter.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/iter.rs b/src/iter.rs index b9c1560..daa67c2 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -108,7 +108,6 @@ pub fn iter(iter_result: &mut IterResult, options: &mut ParsedOptions) -> Vec<Da }; loop { - println!("Main loop"); let (dayset, start, end) = ii.getdayset( &options.freq, counter_date.year() as isize, @@ -120,10 +119,8 @@ pub fn iter(iter_result: &mut IterResult, options: &mut ParsedOptions) -> Vec<Da .into_iter() .map(|s| Some(s as isize)) .collect::<Vec<Option<isize>>>(); - println!("dayset: {:?}", dayset); let filtered = remove_filtered_days(&mut dayset, start, end, &ii, options); - println!("dayset: {:?}", dayset); if not_empty(&options.bysetpos) { let poslist = build_poslist(&options.bysetpos, ×et, start, end, &ii, &dayset); @@ -150,7 +147,6 @@ pub fn iter(iter_result: &mut IterResult, options: &mut ParsedOptions) -> Vec<Da } } } else { - println!("start: {}, end: {}", start, end); for j in start..end { let current_day = dayset[j]; if current_day.is_none() { @@ -159,7 +155,6 @@ pub fn iter(iter_result: &mut IterResult, options: &mut ParsedOptions) -> Vec<Da let current_day = current_day.unwrap(); let date = from_ordinal(ii.yearordinal().unwrap() + current_day); - println!("timeset: {}", timeset.len()); for k in 0..timeset.len() { let res = Utc.ymd(date.year(), date.month(), date.day()).and_hms( timeset[k].hour as u32, @@ -270,10 +265,10 @@ pub fn not_empty<T>(v: &Vec<T>) -> bool { } pub fn is_filtered(ii: &IterInfo, current_day: usize, options: &ParsedOptions) -> bool { - println!( - "Was filtered here: {}", - (not_empty(&options.byweekno) && (ii.wnomask().unwrap()[current_day]) == 0) - ); + //println!( + //"Filtered here: {}", + //(not_empty(&options.byweekno) && (ii.wnomask().unwrap()[current_day]) == 0) + //); return (not_empty(&options.bymonth) && !includes(&options.bymonth, &ii.mmask().unwrap()[current_day])) || (not_empty(&options.byweekno) && (ii.wnomask().unwrap()[current_day]) == 0) |