Skip to content

Commit 226a4ca

Browse files
committed
refactor(07/2025): simplify
1 parent 37d400d commit 226a4ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/solutions/year2025/day07.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub struct Day07;
1414
impl Solution for Day07 {
1515
fn part_one(&self, input: &str) -> String {
1616
let grid: Grid<char> = Grid::from(input);
17-
let max_height = grid.columns_range().end();
17+
let max_height = grid.columns_range().end() + 1;
1818
let start = grid.get_first_position(&START).unwrap();
1919

2020
let splitters: HashSet<Point> = grid.get_all_positions(&SPLITTER).into_iter().collect();
@@ -43,7 +43,7 @@ impl Solution for Day07 {
4343
continue;
4444
}
4545

46-
if down.current().y > max_height + 1 {
46+
if down.current().y > max_height {
4747
continue;
4848
}
4949

0 commit comments

Comments
 (0)