From 13ee93f31cd7c50c5af65688391fd64b9133f83b Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 3 Dec 2022 21:50:06 -0500 Subject: [PATCH] It is building again. --- src/parser/list.rs | 2 +- src/parser/new_context.rs | 2 +- src/parser/parser_with_context.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parser/list.rs b/src/parser/list.rs index 58a5524..d8d5d8e 100644 --- a/src/parser/list.rs +++ b/src/parser/list.rs @@ -26,6 +26,6 @@ impl List { } pub fn get_data(&self) -> Option<&T> { - self.head.map(|rc_node| &rc_node.as_ref().data) + self.head.as_ref().map(|rc_node| &rc_node.data) } } diff --git a/src/parser/new_context.rs b/src/parser/new_context.rs index 9e563dc..b4019cb 100644 --- a/src/parser/new_context.rs +++ b/src/parser/new_context.rs @@ -15,7 +15,7 @@ impl<'r> ContextTree<'r> { ContextTree { tree: List::new() } } - pub fn with_additional_node<'x>(&self, data: ContextElement<'x>) -> ContextTree<'x> { + pub fn with_additional_node(&self, data: ContextElement<'r>) -> ContextTree<'r> { let new_list = self.tree.push_front(data); ContextTree { tree: new_list } } diff --git a/src/parser/parser_with_context.rs b/src/parser/parser_with_context.rs index d011a51..4506d64 100644 --- a/src/parser/parser_with_context.rs +++ b/src/parser/parser_with_context.rs @@ -1,6 +1,6 @@ macro_rules! parser_with_context { ($target:ident) => { - move |context| |i| $target(&context, i) + move |context| move |i| $target(&context, i) }; } pub(crate) use parser_with_context;