mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-05 09:43:31 +02:00
Write the solution file on done
This commit is contained in:
@@ -264,6 +264,16 @@ impl AppState {
|
||||
self.n_done += 1;
|
||||
}
|
||||
|
||||
if self.official_exercises {
|
||||
EMBEDDED_FILES.write_solution_to_disk(
|
||||
self.current_exercise_ind,
|
||||
exercise
|
||||
.dir
|
||||
.context("Official exercises must be nested in the `exercises` directory")?,
|
||||
exercise.name,
|
||||
)?;
|
||||
}
|
||||
|
||||
let Some(ind) = self.next_pending_exercise_ind() else {
|
||||
writer.write_all(RERUNNING_ALL_EXERCISES_MSG)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user