Skip to content

Commit

Permalink
Drop unnecessary from == to check in day 11
Browse files Browse the repository at this point in the history
  • Loading branch information
Riari committed Dec 11, 2023
1 parent 8d28ef7 commit 6a2d70f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/bin/11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ fn solve(input: &str, expand_by: isize) -> Option<u64> {

let mut distance_sum = 0;
for (from, to) in galaxies.iter().tuple_combinations() {
if from == to {
continue;
}

let range_x = if from.0 < to.0 { from.0..to.0 } else { to.0..from.0 };
let range_y = if from.1 < to.1 { from.1..to.1 } else { to.1..from.1 };

Expand Down

0 comments on commit 6a2d70f

Please sign in to comment.