From 6334f8f0a8ab04d72027ac2d9596303276459bc9 Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Wed, 13 Dec 2023 16:11:13 +0100 Subject: [PATCH] day 6 format fix --- src/six.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/six.rs b/src/six.rs index baec2fc..d2a0892 100644 --- a/src/six.rs +++ b/src/six.rs @@ -8,8 +8,7 @@ fn parse_input(lines: &[String]) -> (Vec, Vec) { } fn distance_by_time_pressed(time_pressed: u64, race_time: u64) -> u64 { - let speed = (race_time - time_pressed); - return speed * time_pressed; + (race_time - time_pressed) * time_pressed } fn join_nums(nums: &[u64]) -> u64 {