From e4ee2cd548ded403dd540ab21f97093633a72da6 Mon Sep 17 00:00:00 2001 From: mo8it Date: Wed, 24 Apr 2024 00:48:58 +0200 Subject: [PATCH] Don't write solutions in debug mode --- src/app_state.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app_state.rs b/src/app_state.rs index 152a674..6f393bc 100644 --- a/src/app_state.rs +++ b/src/app_state.rs @@ -11,7 +11,7 @@ use std::{ process::{Command, Stdio}, }; -use crate::{embedded::EMBEDDED_FILES, exercise::Exercise, info_file::ExerciseInfo}; +use crate::{embedded::EMBEDDED_FILES, exercise::Exercise, info_file::ExerciseInfo, DEBUG_PROFILE}; const STATE_FILE_NAME: &str = ".rustlings-state.txt"; const BAD_INDEX_ERR: &str = "The current exercise index is higher than the number of exercises"; @@ -264,7 +264,7 @@ impl AppState { self.n_done += 1; } - if self.official_exercises { + if self.official_exercises && !DEBUG_PROFILE { EMBEDDED_FILES.write_solution_to_disk( self.current_exercise_ind, exercise