Skip to content

Commit

Permalink
naming
Browse files Browse the repository at this point in the history
  • Loading branch information
BakerNet committed Dec 17, 2023
1 parent ab7ab36 commit acb6ebe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bin/17.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ fn valid_neighbors(
})
}

fn shortest_path(
fn dijkstras_with_constraints(
map: &[Vec<usize>],
start: (usize, usize),
goal: (usize, usize),
Expand Down Expand Up @@ -214,7 +214,7 @@ pub fn part_one(input: &str) -> Option<u64> {
.collect()
})
.collect();
shortest_path(&map, (0, 0), (map.len() - 1, map[0].len() - 1), false)
dijkstras_with_constraints(&map, (0, 0), (map.len() - 1, map[0].len() - 1), false)
}

pub fn part_two(input: &str) -> Option<u64> {
Expand All @@ -226,7 +226,7 @@ pub fn part_two(input: &str) -> Option<u64> {
.collect()
})
.collect();
shortest_path(&map, (0, 0), (map.len() - 1, map[0].len() - 1), true)
dijkstras_with_constraints(&map, (0, 0), (map.len() - 1, map[0].len() - 1), true)
}

#[cfg(test)]
Expand Down

0 comments on commit acb6ebe

Please sign in to comment.