From 7bed61a5419d5a7f0f5ae18318163aef4c154c7e Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 10 Dec 2022 23:11:52 -0500 Subject: [PATCH] Lets try not digging into return type O. --- src/parser/text_element_parser.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/parser/text_element_parser.rs b/src/parser/text_element_parser.rs index 88ad0436..6daf261c 100644 --- a/src/parser/text_element_parser.rs +++ b/src/parser/text_element_parser.rs @@ -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>, F), E> +) -> impl FnMut(I) -> IResult, F), E> where - O: Into>, I: Clone + InputLength, E: ParseError, M: for<'a> Fn(Context<'a>, I) -> IResult, T: for<'a> Fn(Context<'a>, I) -> IResult, - 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(¶graph_end)), })); let ret = context_many_till(¶graph_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!()