Lets try not digging into return type O.

This commit is contained in:
Tom Alexander 2022-12-10 23:11:52 -05:00
parent a86ece4d02
commit 7bed61a541
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -47,14 +47,12 @@ fn context_many_till<'r, I, O, E, F, M, T>(
context: Context<'r>,
mut many_matcher: M,
mut till_matcher: T,
) -> impl FnMut(I) -> IResult<I, (Vec<Token<'r>>, F), E>
) -> impl FnMut(I) -> IResult<I, (Vec<O>, F), E>
where
O: Into<Token<'r>>,
I: Clone + InputLength,
E: ParseError<I>,
M: for<'a> Fn(Context<'a>, I) -> IResult<I, O, E>,
T: for<'a> Fn(Context<'a>, I) -> IResult<I, F, E>,
F: 'r,
{
move |mut i: I| {
let mut current_context = context.clone();
@ -135,12 +133,12 @@ pub fn paragraph<'s, 'r>(
fail_matcher: ChainBehavior::AndParent(Some(&paragraph_end)),
}));
let ret = context_many_till(&paragraph_context, flat_text_element, context_paragraph_end)(i);
match ret {
Ok(_) => todo!(),
Err(e) => {
return Err(e);
}
};
// match ret {
// Ok(_) => todo!(),
// Err(e) => {
// return Err(e);
// }
// };
// TODO: FIX THIS
// ret
todo!()