summaryrefslogtreecommitdiff
path: root/src/list.rs
diff options
context:
space:
mode:
authorAdhyan <adhyanpatel@gmail.com>2024-09-03 14:52:09 -0600
committerAdhyan <adhyanpatel@gmail.com>2024-09-03 14:52:09 -0600
commitfea917c8f2a8e9464ab5625f29f06fd622a26a04 (patch)
tree133a59aca99fc69b0ccce35f9a0241ca26c45d4f /src/list.rs
parent948e16e3c783bff20736b356d9f961af3bb00784 (diff)
removed unnecessary update_rows() call and minor refactoring
Diffstat (limited to 'src/list.rs')
-rw-r--r--src/list.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/list.rs b/src/list.rs
index dc224f0..857d0ce 100644
--- a/src/list.rs
+++ b/src/list.rs
@@ -67,9 +67,7 @@ fn handle_list(app_state: &mut AppState, stdout: &mut StdoutLock) -> Result<()>
}
match key.code {
- KeyCode::Char('q') => {
- return Ok(());
- }
+ KeyCode::Char('q') => return Ok(()),
KeyCode::Down | KeyCode::Char('j') => list_state.select_next(),
KeyCode::Up | KeyCode::Char('k') => list_state.select_previous(),
KeyCode::Home | KeyCode::Char('g') => list_state.select_first(),
@@ -102,7 +100,7 @@ fn handle_list(app_state: &mut AppState, stdout: &mut StdoutLock) -> Result<()>
return Ok(());
}
}
- KeyCode::Char('s') | KeyCode::Char('/') => {
+ KeyCode::Char('s' | '/') => {
list_state.message.push_str("search:|");
is_searching = true;
}