From c072da6059adca4a5df41d3bd8eb57093866d4fa Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 24 Jun 2023 20:33:17 -0700 Subject: modulus --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index bdbad85..ec34073 100644 --- a/src/main.rs +++ b/src/main.rs @@ -84,8 +84,8 @@ fn duration_as_human_string(duration_ms: u64) -> String { let duration_hours = duration_min / 60; let duration_ms = duration_ms % 1000; - let duration_sec = duration_sec & 60; - let duration_min = duration_hours & 60; + let duration_sec = duration_sec % 60; + let duration_min = duration_hours % 60; // no need to clamp hours, we're gonna just hope that it's a reasonable number of hours if duration_hours != 0 { -- cgit v1.1