Lifetime issue.

This commit is contained in:
Tom Alexander 2022-07-17 17:29:24 -04:00
parent c88a5305ad
commit 3519c76c61
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 17 additions and 0 deletions

View File

@ -36,4 +36,21 @@ where
can_match_link: true,
}
}
pub fn with_additional_fail_matcher<G>(
self,
additional_fail_matcher: G,
) -> NomContext<impl (for<'b> FnMut(&'b str) -> IResult<&'b str, &'b str, VerboseError<&'b str>>)>
where
G: for<'b> FnMut(&'b str) -> IResult<&'b str, &'b str, VerboseError<&'b str>>,
G: Clone,
// O: for<'b> FnMut(&'b str) -> IResult<&'b str, &'b str, VerboseError<&'b str>>,
// O: Clone,
{
NomContext {
fail_matcher: alt((additional_fail_matcher, self.fail_matcher)),
can_match_bold: self.can_match_bold,
can_match_link: self.can_match_link,
}
}
}