summaryrefslogtreecommitdiff
path: root/src/dev/check.rs
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-07-28 20:30:23 +0200
committermo8it <mo8it@proton.me>2024-07-28 20:30:23 +0200
commit74fab994e2133cc40718abe923645922785c2a57 (patch)
treed05a785e3a69e2dff64e7455ae8d033d4ad03081 /src/dev/check.rs
parent3a99542f7346a639115abd65ea277f32ecd3e5a1 (diff)
Make the output optional
Diffstat (limited to 'src/dev/check.rs')
-rw-r--r--src/dev/check.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/dev/check.rs b/src/dev/check.rs
index 5c35462..2090dab 100644
--- a/src/dev/check.rs
+++ b/src/dev/check.rs
@@ -184,8 +184,7 @@ fn check_exercises_unsolved(info_file: &InfoFile, target_dir: &Path) -> Result<(
error_occurred.store(true, atomic::Ordering::Relaxed);
};
- let mut output = Vec::with_capacity(OUTPUT_CAPACITY);
- match exercise_info.run_exercise(&mut output, target_dir) {
+ match exercise_info.run_exercise(None, target_dir) {
Ok(true) => error(b"Already solved!"),
Ok(false) => (),
Err(e) => error(e.to_string().as_bytes()),
@@ -244,7 +243,7 @@ fn check_solutions(require_solutions: bool, info_file: &InfoFile, target_dir: &P
}
let mut output = Vec::with_capacity(OUTPUT_CAPACITY);
- match exercise_info.run_solution(&mut output, target_dir) {
+ match exercise_info.run_solution(Some(&mut output), target_dir) {
Ok(true) => {
paths.lock().unwrap().insert(PathBuf::from(path));
}