diff options
| author | mo8it <mo8it@proton.me> | 2024-08-25 20:31:08 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-08-25 20:31:08 +0200 |
| commit | 360605e2840d7b8876afac6df5178c068484cd57 (patch) | |
| tree | e453cf5ab30f40e976ce16ee373a2b0fb2f88283 /src/app_state.rs | |
| parent | 47976caa69e24ea9ee5d38918a0abea89ff10983 (diff) | |
| parent | 64772544fad6788fd3fce5db3f357dba6f2d8d23 (diff) | |
Merge branch 'rm-ratatui'
Diffstat (limited to 'src/app_state.rs')
| -rw-r--r-- | src/app_state.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/app_state.rs b/src/app_state.rs index b72469c..8fd8f3b 100644 --- a/src/app_state.rs +++ b/src/app_state.rs @@ -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. |
