From 1ee2c1a3bf5b44462b2c76d54e9b365a17d8a07d Mon Sep 17 00:00:00 2001 From: Trey Blancher Date: Thu, 27 Oct 2022 08:42:13 -0400 Subject: [PATCH] Set maximum daily total to 24.0 --- rust/chug/src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rust/chug/src/main.rs b/rust/chug/src/main.rs index 68400fc..cd03bce 100644 --- a/rust/chug/src/main.rs +++ b/rust/chug/src/main.rs @@ -131,6 +131,9 @@ fn main() { _ => panic!("Error reading file! Error: {}", error) } }; + if gtoth > 24.0 { + gtoth = 24.0; + }; // print the output println!("{}", format!("{:.2}", gtoth)); println!();