diff --git a/src/app_state.rs b/src/app_state.rs
index c3998422..db9d1f10 100644
--- a/src/app_state.rs
+++ b/src/app_state.rs
@@ -1,8 +1,5 @@
use anyhow::{bail, Context, Error, Result};
-use crossterm::{
- style::{ResetColor, SetForegroundColor},
- terminal, QueueableCommand,
-};
+use crossterm::{cursor, terminal, QueueableCommand};
use std::{
env,
fs::{File, OpenOptions},
@@ -23,7 +20,7 @@ use crate::{
embedded::EMBEDDED_FILES,
exercise::{Exercise, RunnableExercise},
info_file::ExerciseInfo,
- term::{self, progress_bar_with_success},
+ term::{self, show_exercises_check_progress},
};
const STATE_FILE_NAME: &str = ".rustlings-state.txt";
@@ -44,18 +41,12 @@ pub enum StateFileStatus {
NotRead,
}
-enum ExerciseCheckProgress {
+#[derive(Clone, Copy)]
+pub enum ExerciseCheckProgress {
+ None,
Checking,
Done,
Pending,
- Error,
-}
-
-#[derive(Clone, Copy)]
-enum ExerciseCheckResult {
- Done,
- Pending,
- Error,
}
pub struct AppState {
@@ -417,27 +408,25 @@ impl AppState {
}
}
- // Return the exercise index of the first pending exercise found.
- pub fn check_all_exercises(&mut self, stdout: &mut StdoutLock) -> Result