Remove some uses of closures in test
This commit is contained in:
parent
116e2fc361
commit
f15488194c
@ -61,8 +61,13 @@ fn json_bool<'a>() -> impl JsonParser<'a, JsonValue> {
|
||||
}
|
||||
|
||||
fn json_number<'a>() -> impl JsonParser<'a, JsonValue> {
|
||||
let digit = || one_of("1234567890");
|
||||
let digits = || repeated(digit()).at_least(1);
|
||||
fn digit<'a>() -> impl JsonParser<'a, &'a str> {
|
||||
one_of("1234567890")
|
||||
}
|
||||
|
||||
fn digits<'a>() -> impl JsonParser<'a, Vec<&'a str>> {
|
||||
repeated(digit()).at_least(1)
|
||||
}
|
||||
|
||||
let json_number_inner = choice((
|
||||
seq((digits(), literal(".").ignore_then(digits()).optional())).map(
|
||||
|
Loading…
Reference in New Issue
Block a user