This commit is contained in:
nora 2023-12-03 18:12:31 +01:00
parent 5c1a089038
commit fa39b5faf4
11 changed files with 18 additions and 18 deletions

View file

@ -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');