We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afc320b commit 789492dCopy full SHA for 789492d
src/app_state.rs
@@ -301,7 +301,7 @@ impl AppState {
301
302
// Return the index of the next pending exercise or `None` if all exercises are done.
303
fn next_pending_exercise_ind(&self) -> Option<usize> {
304
- if self.current_exercise_ind == self.exercises.len() - 1 {
+ if self.current_exercise_ind + 1 == self.exercises.len() {
305
// The last exercise is done.
306
// Search for exercises not done from the start.
307
return self.exercises[..self.current_exercise_ind]
0 commit comments