mirror of
https://github.com/RussellChamp/advent-of-code-2024-rust.git
synced 2026-10-27 23:52:29 +00:00
fix clippy issues and update benchmarks
This commit is contained in:
1 parent
6502e63efe
commit
ee6c70ef8a
11 files changed
+101
-97
No files matched your search
+3
-3
@@ -37,7 +37,7 @@ pub fn part_one(input: &str) -> Option<u32> {
|
||||
Some(total_score as u32)
|
||||
}
|
||||
|
||||
pub fn part_two(input: &str) -> Option<u32> {
|
||||
pub fn part_two(_input: &str) -> Option<u32> {
|
||||
None
|
||||
}
|
||||
|
||||
@@ -51,9 +51,9 @@ fn can_navigate(grid: &Vec<Vec<u32>>, start: &Path, end: &Path) -> bool {
|
||||
if start == end { return true }
|
||||
|
||||
DIRECTIONS.iter().any(|d| {
|
||||
let next_step = Path { row: &start.row + d.0, col: &start.col + d.1, elevation: start.elevation + 1 };
|
||||
let next_step = Path { row: start.row + d.0, col: start.col + d.1, elevation: start.elevation + 1 };
|
||||
// println!("{:?} ==> {:?} ?", start, end);
|
||||
is_valid(&next_step) && can_navigate(&grid, &next_step, &end)
|
||||
is_valid(&next_step) && can_navigate(grid, &next_step, end)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user