Skip to content

Commit

Permalink
clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux committed Dec 2, 2024
1 parent 7a270d5 commit 94fd067
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aoc2024/day2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn safe_line2(left: &[u32], right: &[u32]) -> bool {

for (&l, &r) in left.iter().chain(right).tuple_windows() {
let diff = l.abs_diff(r);
if !(1 <= diff && diff <= 3) {
if !(1..=3).contains(&diff) {
return false;
}

Expand Down

0 comments on commit 94fd067

Please sign in to comment.