Fix lifetime issue.

This commit is contained in:
Tom Alexander
2023-07-14 18:04:01 -04:00
parent 4966b02b79
commit b9a7c3f7f3
3 changed files with 9 additions and 9 deletions

View File

@@ -244,9 +244,9 @@ fn _text_markup_end<'r, 's, 'x>(
Ok((remaining, source))
}
impl<'x> RematchObject for Bold<'x> {
impl<'x> RematchObject<'x> for Bold<'x> {
fn rematch_object<'r, 's>(
&self,
&'x self,
_context: Context<'r, 's>,
input: &'s str,
) -> Res<&'s str, Object<'s>> {
@@ -262,7 +262,7 @@ fn _rematch_text_markup_object<'r, 's, 'x>(
context: Context<'r, 's>,
input: &'s str,
marker_symbol: &'static str,
original_match_children: &'x Vec<Object<'s>>,
original_match_children: &'x Vec<Object<'x>>,
) -> Res<&'s str, Vec<Object<'s>>> {
let (remaining, _) = pre(context, input)?;
let (remaining, open) = tag(marker_symbol)(remaining)?;
@@ -290,5 +290,5 @@ fn _rematch_text_markup_object<'r, 's, 'x>(
let (remaining, _close) = text_markup_end_specialized(context, remaining)?;
let (remaining, _trailing_whitespace) = space0(remaining)?;
Ok((remaining, children))
Ok((remaining, Vec::new()))
}