Final touches :D

This commit is contained in:
mo8it
2024-08-25 20:29:54 +02:00
parent 5f4875e2ba
commit 64772544fa
2 changed files with 63 additions and 35 deletions
+2 -1
View File
@@ -271,6 +271,7 @@ impl AppState {
Ok(exercise.path)
}
// Reset the exercise by index and return its name.
pub fn reset_exercise_by_ind(&mut self, exercise_ind: usize) -> Result<&'static str> {
if exercise_ind >= self.exercises.len() {
bail!(BAD_INDEX_ERR);
@@ -280,7 +281,7 @@ impl AppState {
let exercise = &self.exercises[exercise_ind];
self.reset(exercise_ind, exercise.path)?;
Ok(exercise.path)
Ok(exercise.name)
}
// Return the index of the next pending exercise or `None` if all exercises are done.