summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index c8940af..0469737 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -158,10 +158,8 @@ fn main() -> Result<()> {
}
Some(Subcommands::Reset { name }) => {
app_state.set_current_exercise_by_name(&name)?;
- let exercise = app_state.current_exercise();
- exercise.reset()?;
- println!("The exercise {exercise} has been reset!");
- app_state.set_pending(app_state.current_exercise_ind())?;
+ let exercise_path = app_state.reset_current_exercise()?;
+ println!("The exercise {exercise_path} has been reset");
}
Some(Subcommands::Hint { name }) => {
app_state.set_current_exercise_by_name(&name)?;