More
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: nixos/nix
|
image: nixos/nix:2.28.5
|
||||||
commands:
|
commands:
|
||||||
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
||||||
# Lint
|
# Lint
|
||||||
@@ -12,6 +12,7 @@ steps:
|
|||||||
- nix develop --command cargo test --verbose --release
|
- nix develop --command cargo test --verbose --release
|
||||||
- nix develop --command cargo test --verbose
|
- nix develop --command cargo test --verbose
|
||||||
# Run through Nix
|
# Run through Nix
|
||||||
|
- nix flake check
|
||||||
- nix build
|
- 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_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
|
- nix run . -- computer_enhance/perfaware/part1/listing_0055_challenge_rectangle computer_enhance/perfaware/part1/listing_0055_challenge_rectangle.asm
|
||||||
|
@@ -202,10 +202,9 @@ fn literal_absolute_u8(input: &str) -> IResult<&str, u8> {
|
|||||||
Err(())
|
Err(())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.fold(Ok(0u8), |acc, new| match (acc, new) {
|
.try_fold(0u8, |acc, new| match (acc, new) {
|
||||||
(Ok(acc), Ok(new)) => Ok(acc * 16 + new),
|
|
||||||
(_, Err(())) => Err(()),
|
(_, Err(())) => Err(()),
|
||||||
(Err(()), _) => Err(()),
|
(acc, Ok(new)) => Ok(acc * 16 + new),
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
map_res(digit1, str::parse::<u8>),
|
map_res(digit1, str::parse::<u8>),
|
||||||
@@ -226,10 +225,9 @@ fn literal_absolute_u16(input: &str) -> IResult<&str, u16> {
|
|||||||
Err(())
|
Err(())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.fold(Ok(0u16), |acc, new| match (acc, new) {
|
.try_fold(0u16, |acc, new| match (acc, new) {
|
||||||
(Ok(acc), Ok(new)) => Ok(acc * 16 + new),
|
|
||||||
(_, Err(())) => Err(()),
|
(_, Err(())) => Err(()),
|
||||||
(Err(()), _) => Err(()),
|
(acc, Ok(new)) => Ok(acc * 16 + new),
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
map_res(digit1, str::parse::<u16>),
|
map_res(digit1, str::parse::<u16>),
|
||||||
|
Reference in New Issue
Block a user