@@ -24,7 +24,7 @@ pub fn verify<'a>(
2424 . progress_chars ( "#>-" ) ,
2525 ) ;
2626 bar. set_position ( num_done as u64 ) ;
27- bar. set_message ( format ! ( "({:.1} %)" , percentage ) ) ;
27+ bar. set_message ( format ! ( "({percentage :.1} %)" ) ) ;
2828
2929 for exercise in exercises {
3030 let compile_result = match exercise. mode {
@@ -37,7 +37,7 @@ pub fn verify<'a>(
3737 }
3838 percentage += 100.0 / total as f32 ;
3939 bar. inc ( 1 ) ;
40- bar. set_message ( format ! ( "({:.1} %)" , percentage ) ) ;
40+ bar. set_message ( format ! ( "({percentage :.1} %)" ) ) ;
4141 if bar. position ( ) == total as u64 {
4242 println ! (
4343 "Progress: You completed {} / {} exercises ({:.1} %)." ,
@@ -191,27 +191,25 @@ fn prompt_for_completion(
191191 Mode :: Test => "The code is compiling, and the tests pass!" ,
192192 Mode :: Clippy => clippy_success_msg,
193193 } ;
194- println ! ( ) ;
194+
195195 if no_emoji {
196- println ! ( "~*~ {success_msg} ~*~" )
196+ println ! ( "\n ~*~ {success_msg} ~*~\n " ) ;
197197 } else {
198- println ! ( "🎉 🎉 {success_msg} 🎉 🎉" )
198+ println ! ( "\n 🎉 🎉 {success_msg} 🎉 🎉\n " ) ;
199199 }
200- println ! ( ) ;
201200
202201 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+ ) ;
208206 }
209207 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+ ) ;
215213 }
216214
217215 println ! ( "You can keep working on this exercise," ) ;
@@ -231,7 +229,7 @@ fn prompt_for_completion(
231229 "{:>2} {} {}" ,
232230 style( context_line. number) . blue( ) . bold( ) ,
233231 style( "|" ) . blue( ) ,
234- formatted_line
232+ formatted_line,
235233 ) ;
236234 }
237235
0 commit comments