@@ -24,7 +24,7 @@ pub fn verify<'a>(
24
24
. progress_chars ( "#>-" ) ,
25
25
) ;
26
26
bar. set_position ( num_done as u64 ) ;
27
- bar. set_message ( format ! ( "({:.1} %)" , percentage ) ) ;
27
+ bar. set_message ( format ! ( "({percentage :.1} %)" ) ) ;
28
28
29
29
for exercise in exercises {
30
30
let compile_result = match exercise. mode {
@@ -37,7 +37,7 @@ pub fn verify<'a>(
37
37
}
38
38
percentage += 100.0 / total as f32 ;
39
39
bar. inc ( 1 ) ;
40
- bar. set_message ( format ! ( "({:.1} %)" , percentage ) ) ;
40
+ bar. set_message ( format ! ( "({percentage :.1} %)" ) ) ;
41
41
if bar. position ( ) == total as u64 {
42
42
println ! (
43
43
"Progress: You completed {} / {} exercises ({:.1} %)." ,
@@ -191,27 +191,25 @@ fn prompt_for_completion(
191
191
Mode :: Test => "The code is compiling, and the tests pass!" ,
192
192
Mode :: Clippy => clippy_success_msg,
193
193
} ;
194
- println ! ( ) ;
194
+
195
195
if no_emoji {
196
- println ! ( "~*~ {success_msg} ~*~" )
196
+ println ! ( "\n ~*~ {success_msg} ~*~\n " ) ;
197
197
} else {
198
- println ! ( "🎉 🎉 {success_msg} 🎉 🎉" )
198
+ println ! ( "\n 🎉 🎉 {success_msg} 🎉 🎉\n " ) ;
199
199
}
200
- println ! ( ) ;
201
200
202
201
if let Some ( output) = prompt_output {
203
- println ! ( "Output:" ) ;
204
- println ! ( "{}" , separator( ) ) ;
205
- println ! ( "{output}" ) ;
206
- println ! ( "{}" , separator( ) ) ;
207
- println ! ( ) ;
202
+ println ! (
203
+ "Output:\n {separator}\n {output}\n {separator}\n " ,
204
+ separator = separator( ) ,
205
+ ) ;
208
206
}
209
207
if success_hints {
210
- println ! ( "Hints:" ) ;
211
- println ! ( "{}" , separator ( ) ) ;
212
- println ! ( "{}" , exercise. hint) ;
213
- println ! ( "{}" , separator( ) ) ;
214
- println ! ( ) ;
208
+ println ! (
209
+ "Hints: \n {separator} \n {} \n {separator} \n " ,
210
+ exercise. hint,
211
+ separator = separator ( ) ,
212
+ ) ;
215
213
}
216
214
217
215
println ! ( "You can keep working on this exercise," ) ;
@@ -231,7 +229,7 @@ fn prompt_for_completion(
231
229
"{:>2} {} {}" ,
232
230
style( context_line. number) . blue( ) . bold( ) ,
233
231
style( "|" ) . blue( ) ,
234
- formatted_line
232
+ formatted_line,
235
233
) ;
236
234
}
237
235
0 commit comments