mirror of
https://github.com/Noratrieb/advent-of-code.git
synced 2026-01-17 02:55:01 +01:00
cleanup
This commit is contained in:
parent
5c1a089038
commit
fa39b5faf4
11 changed files with 18 additions and 18 deletions
|
|
@ -21,7 +21,7 @@ pub unsafe fn part2(input: &str) -> u64 {
|
|||
.read_unaligned()
|
||||
.to_le();
|
||||
|
||||
let one = (block & ((1 << (8 * 1)) - 1)) as u8;
|
||||
let one = (block & ((1 << 8) - 1)) as u8;
|
||||
let three = block & ((1 << (8 * 3)) - 1);
|
||||
let four = block & ((1 << (8 * 4)) - 1);
|
||||
let five = block & ((1 << (8 * 5)) - 1);
|
||||
|
|
@ -63,7 +63,7 @@ pub unsafe fn part2(input: &str) -> u64 {
|
|||
};
|
||||
}
|
||||
|
||||
acc |= if one >= b'0' && one <= b'9' { one } else { 0 };
|
||||
acc |= if one.is_ascii_digit() { one } else { 0 };
|
||||
|
||||
check!(EIGHT five == b"eight" => b'8');
|
||||
check!(SEVEN five == b"seven" => b'7');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue