mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-02 16:33:30 +02:00
Fix selected when there are no rows
This commit is contained in:
+3
-1
@@ -72,7 +72,9 @@ pub fn list(app_state: &mut AppState) -> Result<()> {
|
||||
ui_state.message.push_str(message);
|
||||
}
|
||||
KeyCode::Char('r') => {
|
||||
let exercise = ui_state.reset_selected()?;
|
||||
let Some(exercise) = ui_state.reset_selected()? else {
|
||||
continue;
|
||||
};
|
||||
|
||||
ui_state = ui_state.with_updated_rows();
|
||||
ui_state
|
||||
|
||||
Reference in New Issue
Block a user