From e3c56b35e2b397db207995a6085665a59f07ffa6 Mon Sep 17 00:00:00 2001 From: Igor Dejanovic Date: Tue, 2 Jan 2024 20:41:45 +0100 Subject: [PATCH] lint: fix clippy issues --- .../calculator/src/ast_actions/calculator02_ambig_actions.rs | 1 + rustemo-compiler/src/table/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/calculator/src/ast_actions/calculator02_ambig_actions.rs b/examples/calculator/src/ast_actions/calculator02_ambig_actions.rs index 92814b1c..5f7112d6 100644 --- a/examples/calculator/src/ast_actions/calculator02_ambig_actions.rs +++ b/examples/calculator/src/ast_actions/calculator02_ambig_actions.rs @@ -36,6 +36,7 @@ pub struct EC5 { pub e_3: Box, } #[derive(Debug, Clone)] +#[allow(clippy::enum_variant_names)] pub enum E { C1(EC1), C2(EC2), diff --git a/rustemo-compiler/src/table/mod.rs b/rustemo-compiler/src/table/mod.rs index 6952e3fe..c563b1bf 100644 --- a/rustemo-compiler/src/table/mod.rs +++ b/rustemo-compiler/src/table/mod.rs @@ -793,7 +793,7 @@ impl<'g, 's> LRTable<'g, 's> { assert!(shifts.len() <= 1); let mut should_reduce = true; - if let Some(shift) = shifts.get(0) { + if let Some(shift) = shifts.first() { // Shift/Reduce conflict. Use assoc and priority to // resolve. For disambiguation treat ACCEPT action the // same as SHIFT.