From 7414445ef60b28557fb6b2077b647189d5abb10c Mon Sep 17 00:00:00 2001 From: David Beechey Date: Mon, 16 Dec 2024 11:26:18 +0000 Subject: [PATCH] clippy --- lib/sensors/src/temperature.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sensors/src/temperature.rs b/lib/sensors/src/temperature.rs index 4c9305f..729403c 100644 --- a/lib/sensors/src/temperature.rs +++ b/lib/sensors/src/temperature.rs @@ -128,9 +128,9 @@ impl Status { /// - Warning: 0.0 to 20.0 and 80.0 to 100.0 degrees Celsius /// - Critical: Below 0.0 and above 100.0 degrees Celsius pub fn default_calculate_bounds(value: f32) -> SensorValueRange { - if value < 0.0 || value > 100.0 { + if value <= 0.0 || value >= 100.0 { SensorValueRange::Critical(value) - } else if value < 20.0 || value > 80.0 { + } else if value <= 20.0 || value >= 80.0 { SensorValueRange::Warning(value) } else { SensorValueRange::Safe(value)