summaryrefslogtreecommitdiff
path: root/src/run.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/run.rs')
-rw-r--r--src/run.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/run.rs b/src/run.rs
index 929b475..f0faa69 100644
--- a/src/run.rs
+++ b/src/run.rs
@@ -11,7 +11,6 @@ use std::{
use crate::{
app_state::{AppState, ExercisesProgress},
exercise::{solution_link_line, RunnableExercise, OUTPUT_CAPACITY},
- term::terminal_file_link,
};
pub fn run(app_state: &mut AppState) -> Result<()> {
@@ -26,7 +25,9 @@ pub fn run(app_state: &mut AppState) -> Result<()> {
app_state.set_pending(app_state.current_exercise_ind())?;
stdout.write_all(b"Ran ")?;
- terminal_file_link(&mut stdout, app_state.current_exercise().path, Color::Blue)?;
+ app_state
+ .current_exercise()
+ .terminal_file_link(&mut stdout)?;
stdout.write_all(b" with errors\n")?;
exit(1);
}
@@ -46,7 +47,9 @@ pub fn run(app_state: &mut AppState) -> Result<()> {
match app_state.done_current_exercise(&mut stdout)? {
ExercisesProgress::CurrentPending | ExercisesProgress::NewPending => {
stdout.write_all(b"Next exercise: ")?;
- terminal_file_link(&mut stdout, app_state.current_exercise().path, Color::Blue)?;
+ app_state
+ .current_exercise()
+ .terminal_file_link(&mut stdout)?;
stdout.write_all(b"\n")?;
}
ExercisesProgress::AllDone => (),