diff --git a/lib/sched/rules.rs b/lib/sched/rules.rs index b1b8c13..5a38019 100644 --- a/lib/sched/rules.rs +++ b/lib/sched/rules.rs @@ -33,10 +33,10 @@ impl SchedulingRule { } /// 🧉 » get the next execution time from now - pub fn next_from(&self, date: DateTime) -> Option> { + pub fn next_from(&self, base: DateTime) -> Option> { match self { SchedulingRule::Once(date) => { - if date > &date { + if date > &base { Some(*date) } else { None @@ -44,7 +44,7 @@ impl SchedulingRule { } #[cfg(feature = "sched.rule-recurrence")] - SchedulingRule::Repeat(rule) => rule.next_match_from(date), + SchedulingRule::Repeat(rule) => rule.next_match_from(base), #[cfg(feature = "sched.rule-cron")] SchedulingRule::Cron(_cron) => {