mirror of
https://github.com/Noratrieb/advent-of-code.git
synced 2026-01-14 17:45:02 +01:00
cleanup
This commit is contained in:
parent
9b527751a1
commit
f226719715
1 changed files with 3 additions and 8 deletions
|
|
@ -127,11 +127,8 @@ fn part2_parsing(input: &str) -> u64 {
|
|||
let number = input[..space].parse::<u64>().unwrap();
|
||||
*right_map.entry(number).or_default() += 1;
|
||||
input = &input[newline..];
|
||||
// handle lack of trailing newline
|
||||
if !input.is_empty() {
|
||||
input = &input[1..];
|
||||
}
|
||||
}
|
||||
|
||||
let mut score = 0;
|
||||
|
||||
|
|
@ -162,11 +159,9 @@ fn part2_array(input: &str) -> u64 {
|
|||
let number = input[..space].parse::<u64>().unwrap();
|
||||
right_map[number as usize] += 1;
|
||||
input = &input[newline..];
|
||||
// handle lack of trailing newline
|
||||
if !input.is_empty() {
|
||||
|
||||
input = &input[1..];
|
||||
}
|
||||
}
|
||||
|
||||
let mut score = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue