decided to clippy 2023 in 2024

This commit is contained in:
Dylan Thies
2024-12-02 11:49:26 -05:00
parent 0e93372b96
commit cd22838062
7 changed files with 18 additions and 19 deletions

View File

@@ -60,8 +60,7 @@ pub fn part1(input: &str) -> String {
.filter_map(|dir| {
let next_pos = dir + *pos;
node_map
.get(&next_pos)
.is_some()
.contains_key(&next_pos)
.then(|| (node_map[pos], node_map[&next_pos], 1))
})
.collect::<Vec<_>>()

View File

@@ -47,8 +47,7 @@ pub fn part2(input: &str) -> String {
.filter_map(|dir| {
let next_pos = dir + *pos;
node_map
.get(&next_pos)
.is_some()
.contains_key(&next_pos)
.then(|| (node_map[pos], node_map[&next_pos], 1))
})
.collect::<Vec<_>>()