File tree Expand file tree Collapse file tree 2 files changed +20
-18
lines changed Expand file tree Collapse file tree 2 files changed +20
-18
lines changed Original file line number Diff line number Diff line change @@ -33,18 +33,21 @@ pub fn run(app_state: &mut AppState) -> Result<()> {
33
33
) ?;
34
34
35
35
if let Some ( solution_path) = app_state. current_solution_path ( ) ? {
36
- println ! (
37
- "\n A solution file can be found at {}\n " ,
38
- style( TerminalFileLink ( & solution_path) ) . underlined( ) . green( ) ,
39
- ) ;
36
+ writeln ! (
37
+ stdout,
38
+ "\n {} for comparison: {}\n " ,
39
+ "Solution" . bold( ) ,
40
+ style( TerminalFileLink ( & solution_path) ) . underlined( ) . cyan( ) ,
41
+ ) ?;
40
42
}
41
43
42
44
match app_state. done_current_exercise ( & mut stdout) ? {
43
45
ExercisesProgress :: AllDone => ( ) ,
44
- ExercisesProgress :: CurrentPending | ExercisesProgress :: NewPending => println ! (
46
+ ExercisesProgress :: CurrentPending | ExercisesProgress :: NewPending => writeln ! (
47
+ stdout,
45
48
"Next exercise: {}" ,
46
49
app_state. current_exercise( ) . terminal_link( ) ,
47
- ) ,
50
+ ) ? ,
48
51
}
49
52
50
53
Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -137,21 +137,20 @@ impl<'a> WatchState<'a> {
137
137
}
138
138
139
139
if self . done_status != DoneStatus :: Pending {
140
- writeln ! (
141
- self . writer,
142
- "{}\n " ,
143
- "Exercise done ✓
144
- When you are done experimenting, enter `n` to move on to the next exercise 🦀"
145
- . bold( )
146
- . green( ) ,
147
- ) ?;
148
- }
140
+ writeln ! ( self . writer, "{}" , "Exercise done ✓" . bold( ) . green( ) ) ?;
141
+
142
+ if let DoneStatus :: DoneWithSolution ( solution_path) = & self . done_status {
143
+ writeln ! (
144
+ self . writer,
145
+ "{} for comparison: {}" ,
146
+ "Solution" . bold( ) ,
147
+ style( TerminalFileLink ( solution_path) ) . underlined( ) . cyan( ) ,
148
+ ) ?;
149
+ }
149
150
150
- if let DoneStatus :: DoneWithSolution ( solution_path) = & self . done_status {
151
151
writeln ! (
152
152
self . writer,
153
- "A solution file can be found at {}\n " ,
154
- style( TerminalFileLink ( solution_path) ) . underlined( ) . green( ) ,
153
+ "When done experimenting, enter `n` to move on to the next exercise 🦀\n " ,
155
154
) ?;
156
155
}
157
156
You can’t perform that action at this time.
0 commit comments