From d64de4ccfc310c65ccb8bc4dcbb6491aa84c3ab5 Mon Sep 17 00:00:00 2001 From: pablu Date: Fri, 8 May 2026 17:18:13 +0200 Subject: Clippy pedantic changes --- src/event.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/event.rs') diff --git a/src/event.rs b/src/event.rs index b3a0e8f..81cf6bd 100644 --- a/src/event.rs +++ b/src/event.rs @@ -15,10 +15,8 @@ pub fn handle_event(app: &mut App) -> io::Result { crate::app::ViewState::InstalledPackages => { if app.showing_search_window { handle_search_keybinds(key, app); - } else { - if handle_installed_packages_keybinds(key, app) { - return Ok(true); - } + } else if handle_installed_packages_keybinds(key, app) { + return Ok(true); } } } @@ -33,12 +31,10 @@ fn handle_search_keybinds(key: KeyEvent, app: &mut App) { KeyCode::Enter => { app.search(); app.toggle_search_window(); - () } _ => { app.textarea.input_without_shortcuts(key); app.search_found = Some(app.search()); - () } } } @@ -54,7 +50,7 @@ fn handle_installed_packages_keybinds(key: KeyEvent, app: &mut App) -> bool { if selected < 30 { app.list_state.select(Some(0)); } else { - app.list_state.select(Some(selected - 30)) + app.list_state.select(Some(selected - 30)); } } } @@ -85,5 +81,5 @@ fn handle_dashboard_keybinds(key: KeyEvent, app: &mut App) -> bool { _ => {} } - return false; + false } -- cgit 1.3.1