mirror of
https://github.com/Noratrieb/advent-of-code.git
synced 2026-03-14 20:26:03 +01:00
cleanup
This commit is contained in:
parent
a039fddf85
commit
d95881c5cf
5 changed files with 13 additions and 8 deletions
|
|
@ -6,3 +6,4 @@ edition = "2021"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
nom.workspace = true
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
use nom::{character::complete::digit1, combinator::map, IResult};
|
||||
|
||||
pub fn integer(input: &str) -> IResult<&str, u64> {
|
||||
map(digit1, |d: &str| d.parse::<u64>().unwrap())(input)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue