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 {