summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Meringdal <fmeringdal@hotmail.com>2020-12-30 13:30:41 +0100
committerFredrik Meringdal <fmeringdal@hotmail.com>2020-12-30 13:30:41 +0100
commit079ef65aace2d8b6cc1796e61b46224e1d71811a (patch)
treeaea5cddd137f80b023e2c1b5cda25e4d9ea632aa
parent8b9f6c8a1e7bfef65f834ef7ca76e6ba3f517fad (diff)
downloadrust_rrule-079ef65aace2d8b6cc1796e61b46224e1d71811a.zip
bug fixes and cleanup
-rw-r--r--src/iter/mod.rs2
-rw-r--r--src/rruleset_iter.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/iter/mod.rs b/src/iter/mod.rs
index 29e86e0..dc7c51d 100644
--- a/src/iter/mod.rs
+++ b/src/iter/mod.rs
@@ -320,7 +320,7 @@ pub fn remove_filtered_days(
}
pub fn build_timeset(options: &ParsedOptions) -> Vec<Time> {
- let millisecond_mod = (options.dtstart.timestamp_millis() & 1000) as usize;
+ let millisecond_mod = (options.dtstart.timestamp_millis() % 1000) as usize;
if options.freq > Frequenzy::Daily {
return vec![];
diff --git a/src/rruleset_iter.rs b/src/rruleset_iter.rs
index efc8368..c9eca4e 100644
--- a/src/rruleset_iter.rs
+++ b/src/rruleset_iter.rs
@@ -145,8 +145,8 @@ impl<'a> RRuleSetIter<'a> {
_ => (),
};
- for date in &self.rrule_set.rdate.clone() {
- if !self.accept(date.clone()) {
+ for date in self.rrule_set.rdate.clone().into_iter() {
+ if !self.accept(date) {
break;
}
}