diff --git a/src/dfa.rs b/src/dfa.rs index 79b1dcc..13097b5 100644 --- a/src/dfa.rs +++ b/src/dfa.rs @@ -29,8 +29,6 @@ pub(crate) trait ScopeExt: Sized { f(self); self } - - fn drop(self) {} } impl ScopeExt for Any {} diff --git a/src/error_strategy.rs b/src/error_strategy.rs index 04025ad..dc7e4f9 100644 --- a/src/error_strategy.rs +++ b/src/error_strategy.rs @@ -581,7 +581,6 @@ impl<'input, Ctx: ParserNodeType<'input>> BailErrorStrategy<'input, Ctx> { ctx.set_exception(e.clone()); ctx = ctx.get_parent()? } - Some(()) })(); return ANTLRError::FallThrough(Rc::new(ParseCancelledError(e.clone()))); } diff --git a/src/tree.rs b/src/tree.rs index d27e641..bbcf02c 100644 --- a/src/tree.rs +++ b/src/tree.rs @@ -139,7 +139,7 @@ impl<'input, Node: ParserNodeType<'input>, T: 'static> CustomRuleContext<'input> usize::max_value() } - fn get_node_text(&self, rule_names: &[&str]) -> String { + fn get_node_text(&self, _rule_names: &[&str]) -> String { self.symbol.borrow().get_text().to_display() } } @@ -289,14 +289,14 @@ pub trait ParseTreeVisitorCompat<'input>: VisitChildren<'input, Self::Node> { return result; } - fn aggregate_results(&self, aggregate: Self::Return, next: Self::Return) -> Self::Return { + fn aggregate_results(&self, _aggregate: Self::Return, next: Self::Return) -> Self::Return { next } fn should_visit_next_child( &self, - node: &>::Type, - current: &Self::Return, + _node: &>::Type, + _current: &Self::Return, ) -> bool { true } diff --git a/src/utils.rs b/src/utils.rs index ac6e1f6..797a761 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -15,8 +15,6 @@ pub fn escape_whitespaces(data: impl Borrow, escape_spaces: bool) -> String res } -pub trait Sealed {} - pub fn cell_update(cell: &Cell, f: F) -> T where F: FnOnce(T) -> T,