diff options
Diffstat (limited to 'ext/cron/local.rs')
-rw-r--r-- | ext/cron/local.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/cron/local.rs b/ext/cron/local.rs index 0b6dcae2e..5f1ace6d1 100644 --- a/ext/cron/local.rs +++ b/ext/cron/local.rs @@ -174,8 +174,11 @@ impl RuntimeState { .map(move |name| (*ts, name.clone())) .collect::<Vec<_>>() }) - .map(|(_, name)| { - (name.clone(), self.crons.get(&name).unwrap().next_tx.clone()) + .filter_map(|(_, name)| { + self + .crons + .get(&name) + .map(|c| (name.clone(), c.next_tx.clone())) }) .collect::<Vec<_>>() }; |