diff --git a/src/main.rs b/src/main.rs index 9e96b54..60d1227 100644 --- a/src/main.rs +++ b/src/main.rs @@ -127,12 +127,13 @@ pub async fn get_world( zone.alert = alert.cloned(); if zone.locked { - zone.locked_since = most_recent_alerts + zone.locked_since = match most_recent_alerts .iter() .find(|alert| alert.zone == zone.id) - .cloned() - .unwrap() - .end_time + { + Some(alert) => alert.end_time, + None => None, + }; } zone