diff options
-rw-r--r-- | src/rrule.rs | 8 | ||||
-rw-r--r-- | src/rruleset.rs | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/rrule.rs b/src/rrule.rs index aa000d1..7ac6016 100644 --- a/src/rrule.rs +++ b/src/rrule.rs @@ -15,14 +15,14 @@ impl RRule { } /// Returns all the recurrences of the rrule - pub fn all(&mut self) -> Vec<DateTime<Tz>> { + pub fn all(&self) -> Vec<DateTime<Tz>> { self.clone().into_iter().collect() } /// Returns the last recurrence before the given datetime instance. /// The inc keyword defines what happens if dt is an recurrence. /// With inc == true, if dt itself is an recurrence, it will be returned. - pub fn before(&mut self, dt: DateTime<Tz>, inc: bool) -> Option<DateTime<Tz>> { + pub fn before(&self, dt: DateTime<Tz>, inc: bool) -> Option<DateTime<Tz>> { self.clone() .into_iter() .take_while(|d| if inc { *d <= dt } else { *d < dt }) @@ -32,7 +32,7 @@ impl RRule { /// Returns the last recurrence after the given datetime instance. /// The inc keyword defines what happens if dt is an recurrence. /// With inc == true, if dt itself is an recurrence, it will be returned. - pub fn after(&mut self, dt: DateTime<Tz>, inc: bool) -> Option<DateTime<Tz>> { + pub fn after(&self, dt: DateTime<Tz>, inc: bool) -> Option<DateTime<Tz>> { self.clone() .into_iter() .skip_while(|d| if inc { *d <= dt } else { *d < dt }) @@ -44,7 +44,7 @@ impl RRule { /// themselves recurrences. With inc == true, they will be included in the /// list, if they are found in the recurrence set. pub fn between( - &mut self, + &self, after: DateTime<Tz>, before: DateTime<Tz>, inc: bool, diff --git a/src/rruleset.rs b/src/rruleset.rs index 4ae7c41..c194744 100644 --- a/src/rruleset.rs +++ b/src/rruleset.rs @@ -43,14 +43,14 @@ impl RRuleSet { } /// Returns all the recurrences of the rruleset - pub fn all(&mut self) -> Vec<DateTime<Tz>> { + pub fn all(&self) -> Vec<DateTime<Tz>> { self.clone().into_iter().collect() } /// Returns the last recurrence before the given datetime instance. /// The inc keyword defines what happens if dt is an recurrence. /// With inc == true, if dt itself is an recurrence, it will be returned. - pub fn before(&mut self, dt: DateTime<Tz>, inc: bool) -> Option<DateTime<Tz>> { + pub fn before(&self, dt: DateTime<Tz>, inc: bool) -> Option<DateTime<Tz>> { self.clone() .into_iter() .take_while(|d| if inc { *d <= dt } else { *d < dt }) @@ -60,7 +60,7 @@ impl RRuleSet { /// Returns the last recurrence after the given datetime instance. /// The inc keyword defines what happens if dt is an recurrence. /// With inc == true, if dt itself is an recurrence, it will be returned. - pub fn after(&mut self, dt: DateTime<Tz>, inc: bool) -> Option<DateTime<Tz>> { + pub fn after(&self, dt: DateTime<Tz>, inc: bool) -> Option<DateTime<Tz>> { self.clone() .into_iter() .skip_while(|d| if inc { *d <= dt } else { *d < dt }) @@ -72,7 +72,7 @@ impl RRuleSet { /// themselves recurrences. With inc == true, they will be included in the /// list, if they are found in the recurrence set. pub fn between( - &mut self, + &self, after: DateTime<Tz>, before: DateTime<Tz>, inc: bool, |