mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-04 09:13:30 +02:00
Highlight the solution file
This commit is contained in:
+11
-12
@@ -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",
|
||||
)?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user