summaryrefslogtreecommitdiff
path: root/src/watch
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-08-20 16:04:29 +0200
committermo8it <mo8it@proton.me>2024-08-20 16:04:29 +0200
commite7ba88f90594962795bd028a8537efd6b1eedf6e (patch)
tree067a07d00124db850525182470d9fe2fa9cc3d78 /src/watch
parent50f6e5232e342931beec67a7edae191feadf4d75 (diff)
Highlight the solution file
Diffstat (limited to 'src/watch')
-rw-r--r--src/watch/state.rs23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/watch/state.rs b/src/watch/state.rs
index abfff7a..fe972fa 100644
--- a/src/watch/state.rs
+++ b/src/watch/state.rs
@@ -137,21 +137,20 @@ impl<'a> WatchState<'a> {
}
if self.done_status != DoneStatus::Pending {
- writeln!(
- self.writer,
- "{}\n",
- "Exercise done ✓
-When you are done experimenting, enter `n` to move on to the next exercise 🦀"
- .bold()
- .green(),
- )?;
- }
+ writeln!(self.writer, "{}", "Exercise done ✓".bold().green())?;
+
+ if let DoneStatus::DoneWithSolution(solution_path) = &self.done_status {
+ writeln!(
+ self.writer,
+ "{} for comparison: {}",
+ "Solution".bold(),
+ style(TerminalFileLink(solution_path)).underlined().cyan(),
+ )?;
+ }
- if let DoneStatus::DoneWithSolution(solution_path) = &self.done_status {
writeln!(
self.writer,
- "A solution file can be found at {}\n",
- style(TerminalFileLink(solution_path)).underlined().green(),
+ "When done experimenting, enter `n` to move on to the next exercise 🦀\n",
)?;
}