aboutsummaryrefslogtreecommitdiff
path: root/src/event.rs
diff options
context:
space:
mode:
authorpablu <me@pablu.de>2026-05-08 17:18:13 +0200
committerpablu <me@pablu.de>2026-05-08 17:18:13 +0200
commitd64de4ccfc310c65ccb8bc4dcbb6491aa84c3ab5 (patch)
tree648914175cafc2e9dced6d261eb3980125e675c0 /src/event.rs
parent1ca75982e3c9ae99b2c236a35d4a7f9e07f47ec6 (diff)
Clippy pedantic changes
Diffstat (limited to 'src/event.rs')
-rw-r--r--src/event.rs12
1 files changed, 4 insertions, 8 deletions
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<bool> {
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
}