diff options
| author | Mo <76752051+mo8it@users.noreply.github.com> | 2024-10-14 01:29:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-14 01:29:25 +0200 |
| commit | baeeff389c95ba145e3383ec1f1357e078d0bbca (patch) | |
| tree | 4d3157197acaf9705c5d1da17b3e6c5c28dc495b /src/watch.rs | |
| parent | 84a42a2b24687ed11f4d2a5c9b624d00b74de916 (diff) | |
| parent | 932bc25d8824e18debc91e5f25f022e8d066bcf8 (diff) | |
Merge pull request #2122 from Nahor/check_all
Improvement to "check all exercises"
Diffstat (limited to 'src/watch.rs')
| -rw-r--r-- | src/watch.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/watch.rs b/src/watch.rs index 35533b0..6259c9d 100644 --- a/src/watch.rs +++ b/src/watch.rs @@ -103,6 +103,13 @@ fn run_watch( WatchEvent::Input(InputEvent::Run) => watch_state.run_current_exercise(&mut stdout)?, WatchEvent::Input(InputEvent::Hint) => watch_state.show_hint(&mut stdout)?, WatchEvent::Input(InputEvent::List) => return Ok(WatchExit::List), + WatchEvent::Input(InputEvent::CheckAll) => match watch_state + .check_all_exercises(&mut stdout)? + { + ExercisesProgress::AllDone => break, + ExercisesProgress::NewPending => watch_state.run_current_exercise(&mut stdout)?, + ExercisesProgress::CurrentPending => watch_state.render(&mut stdout)?, + }, WatchEvent::Input(InputEvent::Reset) => watch_state.reset_exercise(&mut stdout)?, WatchEvent::Input(InputEvent::Quit) => { stdout.write_all(QUIT_MSG)?; |
