Don't special-case choices2

This commit is contained in:
Greg Shuflin 2022-10-22 22:44:36 -07:00
parent 60141dd766
commit 502bfa9587
1 changed files with 1 additions and 4 deletions

View File

@ -7,10 +7,7 @@ where
P2: Parser<I, O, E>,
I: ParserInput + Clone,
{
move |input: I| match parser1.parse(input.clone()) {
ok @ Ok(..) => ok,
Err(_e) => parser2.parse(input),
}
choice((parser1, parser2))
}
pub fn choice<C, I, O, E>(choices: C) -> (impl Parser<I, O, E>, Bnf)