From 68b23e0ff9edcdd0b92797cfc23365c7b117772c Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Mon, 5 Oct 2026 02:41:08 +0200 Subject: [PATCH] refactor(tui): satisfy strict Clippy lint Replace the single-pattern key-event match with if let while preserving quit behavior and the planned navigation notes. Validation: cargo test --workspace --all-targets --all-features; cargo clippy --workspace --all-targets --all-features -- -D warnings. --- tui/src/lib.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tui/src/lib.rs b/tui/src/lib.rs index 0726b13..a21014d 100644 --- a/tui/src/lib.rs +++ b/tui/src/lib.rs @@ -54,11 +54,10 @@ impl Tui { } fn handle_key_event(&mut self, key_event: KeyEvent) { - match key_event.code { - KeyCode::Char('q') => self.exit(), - // KeyCode::Left => self.decrement_counter(), - // KeyCode::Right => self.increment_counter(), - _ => {} + // KeyCode::Left => self.decrement_counter(), + // KeyCode::Right => self.increment_counter(), + if let KeyCode::Char('q') = key_event.code { + self.exit(); } }