refactor(parser): Switch 'impl FnMut' to 'impl Parser'

We did most of this in 88c702e but missed some spots
This commit is contained in:
Ed Page 2024-10-25 16:35:21 -05:00
parent b08fbebf8f
commit bafa30f2c4

View File

@ -1313,7 +1313,7 @@ pub struct Ws(pub Option<Whitespace>, pub Option<Whitespace>);
fn end_node<'a, 'g: 'a>(
node: &'g str,
expected: &'g str,
) -> impl Fn(&'a str) -> ParseResult<'a> + 'g {
) -> impl Parser<&'a str, &'a str, ErrorContext<'a>> + 'g {
move |start| {
let (i, actual) = ws(identifier).parse_next(start)?;
if actual == expected {