heliwatch: don't create needless new states

This commit is contained in:
Astro 2021-11-09 16:42:22 +01:00
parent f56244b7ef
commit 4e3504259a
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ pub fn run(host: &'static str, port: u16, locations: Locations) -> Receiver<Even
}
if let Some(event) = states.entry(hex.clone())
.or_insert(State::new(hex.clone()))
.or_insert_with(|| State::new(hex.clone()))
.update(&entry, &locations) {
events.push(event);
}