mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-02 08:23:31 +02:00
Don't skip exercises on file changes
This commit is contained in:
@@ -198,6 +198,10 @@ impl AppState {
|
||||
}
|
||||
|
||||
pub fn set_current_exercise_ind(&mut self, exercise_ind: usize) -> Result<()> {
|
||||
if exercise_ind == self.current_exercise_ind {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
if exercise_ind >= self.exercises.len() {
|
||||
bail!(BAD_INDEX_ERR);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user