mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-04 09:13:30 +02:00
removed unnecessary update_rows() call and minor refactoring
This commit is contained in:
+2
-4
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user