diff options
author | Justin Wernick <justin@worthe-it.co.za> | 2021-12-01 10:13:48 +0200 |
---|---|---|
committer | Justin Wernick <justin@worthe-it.co.za> | 2021-12-01 10:13:48 +0200 |
commit | 363ea1a0243c137b2480c421404e5124770ed09b (patch) | |
tree | aa5be02eb1e9319d7e064e9a00274bd33c00a2da /src/parsers.rs | |
parent | 18bdad10c27d199a4085655ce93902d4bba0d534 (diff) |
Refactor out common code
Diffstat (limited to 'src/parsers.rs')
-rw-r--r-- | src/parsers.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parsers.rs b/src/parsers.rs index 27b2aad..c33a3cc 100644 --- a/src/parsers.rs +++ b/src/parsers.rs @@ -2,5 +2,5 @@ use nom::{character::complete::digit1, combinator::map_res, IResult}; use std::str::FromStr; pub fn u64(input: &str) -> IResult<&str, u64> { - map_res(digit1, |number| u64::from_str(number))(input) + map_res(digit1, u64::from_str)(input) } |