diff options
| author | mo8it <mo8it@proton.me> | 2024-04-07 04:59:22 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-04-07 04:59:22 +0200 |
| commit | b0a475062445705853b4f861ee9e3135065f0660 (patch) | |
| tree | b7782712119ec7865a056c3626b52decb1f6b2fd /src/watch.rs | |
| parent | 4f69285375342951da36346f1a1b93f7903a362f (diff) | |
Implement "continue at"
Diffstat (limited to 'src/watch.rs')
| -rw-r--r-- | src/watch.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/watch.rs b/src/watch.rs index 92da20d..cc9668d 100644 --- a/src/watch.rs +++ b/src/watch.rs @@ -158,7 +158,7 @@ pub fn watch(state: &State, exercises: &[Exercise]) -> Result<()> { .watcher() .watch(Path::new("exercises"), RecursiveMode::Recursive)?; - let current_exercise_ind = state.progress.iter().position(|done| *done).unwrap_or(0); + let current_exercise_ind = state.next_exercise_ind(); let exercise = &exercises[current_exercise_ind]; |
