1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-11-21 17:56:35 +02:00

Ignore input while checking all exercises in watch mode

This commit is contained in:
mo8it 2024-11-11 14:55:58 +01:00
parent fd33c29b26
commit eff2ce8a23

View File

@ -269,6 +269,9 @@ impl<'a> WatchState<'a> {
}
pub fn check_all_exercises(&mut self, stdout: &mut StdoutLock) -> Result<ExercisesProgress> {
// Ignore any input until checking all exercises is done.
let _input_pause_guard = InputPauseGuard::scoped_pause();
if let Some(first_pending_exercise_ind) = self.app_state.check_all_exercises(stdout)? {
// Only change exercise if the current one is done.
if self.app_state.current_exercise().done {