Skip to content

Commit

Permalink
refactor: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
manhunto committed Dec 1, 2024
1 parent a8facfb commit d354ddc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/solutions/year2024/day01.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ impl Solution for Day01 {
right.sort_unstable();

left.iter()
.zip(right.iter())
.zip(&right)
.map(|(a, b)| (a - b).abs())
.sum::<i32>()
.to_string()
Expand Down

0 comments on commit d354ddc

Please sign in to comment.