diff --git a/src/parser/list.rs b/src/parser/list.rs index ccf6687b..6a91cb76 100644 --- a/src/parser/list.rs +++ b/src/parser/list.rs @@ -26,7 +26,6 @@ impl Node { } } -// TODO: This Debug is only needed because of the try_unwrap+expect impl List { pub fn new() -> Self { List { head: None } @@ -47,7 +46,7 @@ impl List { Some(popped_node) => { let extracted_node = match Rc::try_unwrap(popped_node) { Ok(node) => node, - Err(e) => panic!("try_unwrap failed on Rc in pop_front on List."), + Err(_) => panic!("try_unwrap failed on Rc in pop_front on List."), }; ( Some(extracted_node.data), diff --git a/src/parser/parser_context.rs b/src/parser/parser_context.rs index 76d1ab23..32bc039b 100644 --- a/src/parser/parser_context.rs +++ b/src/parser/parser_context.rs @@ -4,13 +4,13 @@ use nom::IResult; use super::error::CustomError; use super::error::MyError; +use super::error::Res; use super::list::List; use super::list::Node; use super::token::Token; use super::Context; -type Matcher = - dyn for<'r, 's> Fn(Context<'r, 's>, &'s str) -> IResult<&'s str, &'s str, CustomError<&'s str>>; +type Matcher = dyn for<'r, 's> Fn(Context<'r, 's>, &'s str) -> Res<&'s str, &'s str>; #[derive(Debug, Clone)] pub struct ContextTree<'r, 's> {