Make the output optional

This commit is contained in:
mo8it
2024-07-28 20:30:23 +02:00
parent 3a99542f73
commit 74fab994e2
7 changed files with 84 additions and 53 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ use crate::{
pub fn run(app_state: &mut AppState) -> Result<()> {
let exercise = app_state.current_exercise();
let mut output = Vec::with_capacity(OUTPUT_CAPACITY);
let success = exercise.run_exercise(&mut output, app_state.target_dir())?;
let success = exercise.run_exercise(Some(&mut output), app_state.target_dir())?;
let mut stdout = io::stdout().lock();
stdout.write_all(&output)?;