From 726dd7c1450bc2e6155e15783a403c3a787ec33c Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Sat, 29 Aug 2026 19:33:20 +0700 Subject: [PATCH] fix: clippy map_or_identity in smart_keymap Replace `Option::map_or(0, |t| t)` with `unwrap_or(0)` in the C FFI event-timeout helpers. Clippy 1.98 denies `map_or_identity` under `-D warnings`; this is pre-existing on master (CI rustc 1.98 vs local 1.97). Model: grok-4.6 Agent: Grok Build Co-Authored-By: Grok 4.6 Co-Authored-By: Grok Build --- smart_keymap/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smart_keymap/src/lib.rs b/smart_keymap/src/lib.rs index cd9943a05..2046149f0 100644 --- a/smart_keymap/src/lib.rs +++ b/smart_keymap/src/lib.rs @@ -346,7 +346,7 @@ pub unsafe extern "C" fn keymap_register_input_after_ms( debug_assert!(next_ms > 0); } - next_ev.map_or(0, |t| t) + next_ev.unwrap_or(0) } } @@ -371,7 +371,7 @@ pub unsafe extern "C" fn keymap_next_event_timeout(report: &mut KeymapHidReport) debug_assert!(next_ms > 0); } - next_ev.map_or(0, |t| t) + next_ev.unwrap_or(0) } }