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
1 changed files with 7 additions and 9 deletions

View File

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