diff options
Diffstat (limited to 'src/rrule.rs')
-rw-r--r-- | src/rrule.rs | 8 |
1 files changed, 4 insertions, 4 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, |