mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-04 17:23:36 +02:00
Improve resetting
This commit is contained in:
+2
-4
@@ -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)?;
|
||||
|
||||
Reference in New Issue
Block a user