with_additional_fail_matcher is not going to work due to lifetimes with the new forced borrow.

This commit is contained in:
Tom Alexander 2022-11-26 22:08:17 -05:00
parent e8b44f27e8
commit 0b2acd7e54
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -98,6 +98,15 @@ impl<'r> ContextTree<'r, dyn OrgModeContext<'r>> {
ErrorKind::ManyTill,
)));
}
pub fn with_additional_fail_matcher(
&'r self,
fail_matcher: &'r Matcher,
) -> OrgModeContextTree<'r> {
self.with_additional_node(FailMatcherNode {
fail_matcher: ChainBehavior::AndParent(Some(fail_matcher)),
})
}
}
impl<'r> OrgModeContext<'r> for FailMatcherNode<'r> {