From f6b26c9659dc60fa2d59399b897786ec8be53968 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sun, 13 Feb 2022 16:55:03 +0100 Subject: [PATCH] Fix expect message --- src/maps.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/maps.rs b/src/maps.rs index 68e17a0..3956802 100644 --- a/src/maps.rs +++ b/src/maps.rs @@ -107,35 +107,35 @@ impl Maps { impl MapsRefresh for MapsHandle { fn needs_pollen_refresh(&self) -> bool { - let maps = self.lock().expect("Maps mutex was poisoned"); + let maps = self.lock().expect("Maps handle mutex was poisoned"); maps.pollen.is_none() || Instant::now().duration_since(maps.pollen_stamp) > POLLEN_INTERVAL } fn needs_precipitation_refresh(&self) -> bool { - let maps = self.lock().expect("Maps mutex was poisoned"); + let maps = self.lock().expect("Maps handle mutex was poisoned"); maps.precipitation.iter().any(|map| map.is_none()) || Instant::now().duration_since(maps.precipitation_stamp) > PRECIPITATION_INTERVAL } fn needs_uvi_refresh(&self) -> bool { - let maps = self.lock().expect("Maps mutex was poisoned"); + let maps = self.lock().expect("Maps handle mutex was poisoned"); maps.uvi.is_none() || Instant::now().duration_since(maps.uvi_stamp) > UVI_INTERVAL } fn set_pollen(&self, pollen: Option) { - let mut maps = self.lock().expect("Maps mutex was poisoned"); + let mut maps = self.lock().expect("Maps handle mutex was poisoned"); maps.pollen = pollen; maps.pollen_stamp = Instant::now(); } fn set_precipitation(&self, precipitation: [Option; 24]) { - let mut maps = self.lock().expect("Maps mutex was poisoned"); + let mut maps = self.lock().expect("Maps handle mutex was poisoned"); maps.precipitation = precipitation; maps.precipitation_stamp = Instant::now(); } fn set_uvi(&self, uvi: Option) { - let mut maps = self.lock().expect("Maps mutex was poisoned"); + let mut maps = self.lock().expect("Maps handle mutex was poisoned"); maps.uvi = uvi; maps.uvi_stamp = Instant::now(); }