mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-11-08 09:09:17 +01:00
Don't write solutions in debug mode
This commit is contained in:
parent
b77007887c
commit
e4ee2cd548
@ -11,7 +11,7 @@ use std::{
|
|||||||
process::{Command, Stdio},
|
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 STATE_FILE_NAME: &str = ".rustlings-state.txt";
|
||||||
const BAD_INDEX_ERR: &str = "The current exercise index is higher than the number of exercises";
|
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;
|
self.n_done += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.official_exercises {
|
if self.official_exercises && !DEBUG_PROFILE {
|
||||||
EMBEDDED_FILES.write_solution_to_disk(
|
EMBEDDED_FILES.write_solution_to_disk(
|
||||||
self.current_exercise_ind,
|
self.current_exercise_ind,
|
||||||
exercise
|
exercise
|
||||||
|
Loading…
Reference in New Issue
Block a user