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
+4
-4
@@ -14,10 +14,10 @@ pub fn part_one(input: &str) -> Option<u32> {
|
||||
|
||||
for (col_idx, c) in line.chars().enumerate(){
|
||||
if c != '.' {
|
||||
if antennas.contains_key(&c) {
|
||||
antennas.entry(c).and_modify(|v| v.push((row_idx as u32, col_idx as u32)));
|
||||
} else {
|
||||
if let std::collections::hash_map::Entry::Vacant(_e) = antennas.entry(c) {
|
||||
antennas.insert(c, vec![(row_idx as u32, col_idx as u32)]);
|
||||
} else {
|
||||
antennas.entry(c).and_modify(|v| v.push((row_idx as u32, col_idx as u32)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ pub fn part_one(input: &str) -> Option<u32> {
|
||||
Some(locations.count() as u32)
|
||||
}
|
||||
|
||||
pub fn part_two(input: &str) -> Option<u32> {
|
||||
pub fn part_two(_input: &str) -> Option<u32> {
|
||||
None
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user