More
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/pr/build Pipeline failed
ci/woodpecker/push/all-checks-complete Pipeline was successful
ci/woodpecker/pr/all-checks-complete unknown status

This commit is contained in:
Smaug123
2025-09-09 07:08:52 +01:00
parent b468edc966
commit 2c24381f9e
2 changed files with 6 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
steps:
build:
image: nixos/nix
image: nixos/nix:2.28.5
commands:
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
# Lint
@@ -12,6 +12,7 @@ steps:
- nix develop --command cargo test --verbose --release
- nix develop --command cargo test --verbose
# Run through Nix
- nix flake check
- nix build
- nix run . -- computer_enhance/perfaware/part1/listing_0038_many_register_mov computer_enhance/perfaware/part1/listing_0038_many_register_mov.asm
- nix run . -- computer_enhance/perfaware/part1/listing_0055_challenge_rectangle computer_enhance/perfaware/part1/listing_0055_challenge_rectangle.asm

View File

@@ -202,10 +202,9 @@ fn literal_absolute_u8(input: &str) -> IResult<&str, u8> {
Err(())
}
})
.fold(Ok(0u8), |acc, new| match (acc, new) {
(Ok(acc), Ok(new)) => Ok(acc * 16 + new),
.try_fold(0u8, |acc, new| match (acc, new) {
(_, Err(())) => Err(()),
(Err(()), _) => Err(()),
(acc, Ok(new)) => Ok(acc * 16 + new),
})
}),
map_res(digit1, str::parse::<u8>),
@@ -226,10 +225,9 @@ fn literal_absolute_u16(input: &str) -> IResult<&str, u16> {
Err(())
}
})
.fold(Ok(0u16), |acc, new| match (acc, new) {
(Ok(acc), Ok(new)) => Ok(acc * 16 + new),
.try_fold(0u16, |acc, new| match (acc, new) {
(_, Err(())) => Err(()),
(Err(()), _) => Err(()),
(acc, Ok(new)) => Ok(acc * 16 + new),
})
}),
map_res(digit1, str::parse::<u16>),