From 6a4eea2ca999bd251b43196c149b3cbeed5a0ad0 Mon Sep 17 00:00:00 2001 From: matt rice Date: Tue, 4 Feb 2025 08:56:27 -0800 Subject: [PATCH] Update to latest clippy --- lrlex/src/lib/lexer.rs | 3 +-- lrpar/src/lib/ctbuilder.rs | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lrlex/src/lib/lexer.rs b/lrlex/src/lib/lexer.rs index 10afa0277..ab9817d0b 100644 --- a/lrlex/src/lib/lexer.rs +++ b/lrlex/src/lib/lexer.rs @@ -340,8 +340,7 @@ where &self .rules .iter() - .filter(|x| x.name().is_some()) - .map(|x| x.name().unwrap()) + .filter_map(|x| x.name()) .collect::>(), ) .cloned() diff --git a/lrpar/src/lib/ctbuilder.rs b/lrpar/src/lib/ctbuilder.rs index 9e95cd0cc..f7003b50c 100644 --- a/lrpar/src/lib/ctbuilder.rs +++ b/lrpar/src/lib/ctbuilder.rs @@ -991,6 +991,7 @@ where Symbol::Rule(ref_ridx) => { write!(outs, " + #[allow(clippy::let_unit_value)] let {prefix}arg_{i} = match {prefix}args.next().unwrap() {{ ::lrpar::parser::AStackType::ActionType({actionskind}::{actionskindprefix}{ref_ridx}(x)) => x, _ => unreachable!()