summaryrefslogtreecommitdiff
path: root/src/app_state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app_state.rs')
-rw-r--r--src/app_state.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/app_state.rs b/src/app_state.rs
index cc77711..2a20568 100644
--- a/src/app_state.rs
+++ b/src/app_state.rs
@@ -301,7 +301,7 @@ impl AppState {
// Return the index of the next pending exercise or `None` if all exercises are done.
fn next_pending_exercise_ind(&self) -> Option<usize> {
- if self.current_exercise_ind == self.exercises.len() - 1 {
+ if self.current_exercise_ind + 1 == self.exercises.len() {
// The last exercise is done.
// Search for exercises not done from the start.
return self.exercises[..self.current_exercise_ind]