@@ -57,15 +57,15 @@ impl std::fmt::Display for Problem {
5757 1 => {
5858 id. push_str ( & SPACE . repeat ( 2 ) ) ;
5959 id. push_str ( & self . fid . to_string ( ) ) ;
60- id. push_str ( & SPACE . repeat ( 1 ) ) ;
60+ id. push_str ( & SPACE . to_string ( ) ) ;
6161 }
6262 2 => {
63- id. push_str ( & SPACE . repeat ( 1 ) ) ;
63+ id. push_str ( & SPACE . to_string ( ) ) ;
6464 id. push_str ( & self . fid . to_string ( ) ) ;
65- id. push_str ( & SPACE . repeat ( 1 ) ) ;
65+ id. push_str ( & SPACE . to_string ( ) ) ;
6666 }
6767 3 => {
68- id. push_str ( & SPACE . repeat ( 1 ) ) ;
68+ id. push_str ( & SPACE . to_string ( ) ) ;
6969 id. push_str ( & self . fid . to_string ( ) ) ;
7070 }
7171 4 => {
@@ -304,26 +304,30 @@ impl std::fmt::Display for VerifyResult {
304304 }
305305 write ! (
306306 f,
307- "\n {}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}.\n \n " ,
307+ "\n {}{}{}\
308+ , faster than \
309+ {}{}\
310+ of \
311+ {} \
312+ online submissions for \
313+ {}.\n \n \
314+ {}{}\
315+ , less than \
316+ {}{} \
317+ of \
318+ {}{}.\n \n ",
308319 "Success\n \n " . green( ) . bold( ) ,
309320 "Runtime: " . dimmed( ) ,
310321 & self . status. status_runtime. bold( ) ,
311- ", faster than " ,
312322 rp. to_string( ) . bold( ) ,
313323 "% " . bold( ) ,
314- "of " ,
315324 & self . pretty_lang,
316- " online submissions for " ,
317325 & self . name,
318- ".\n \n " ,
319326 "Memory Usage: " . dimmed( ) ,
320327 & self . status. status_memory. bold( ) ,
321- ", less than " ,
322328 mp. to_string( ) . bold( ) ,
323329 "% " . bold( ) ,
324- "of " ,
325330 & self . pretty_lang,
326- " online submissions for " ,
327331 & self . name,
328332 ) ?
329333 } else {
@@ -400,7 +404,7 @@ impl std::fmt::Display for VerifyResult {
400404
401405 match & self . result_type {
402406 Run :: Test => {
403- if & self . code_output . len ( ) > & 0 {
407+ if ! self . code_output . is_empty ( ) {
404408 write ! (
405409 f,
406410 "{}{}" ,
@@ -412,7 +416,7 @@ impl std::fmt::Display for VerifyResult {
412416 }
413417 }
414418 _ => {
415- if & self . std_output . len ( ) > & 0 {
419+ if ! self . std_output . is_empty ( ) {
416420 write ! (
417421 f,
418422 "{}{}" ,
@@ -510,19 +514,19 @@ mod verify {
510514
511515/// Formatter for str
512516trait Formatter {
513- fn after_spaces < ' f > ( & self , spaces : usize ) -> String ;
514- fn before_spaces < ' f > ( & self , spaces : usize ) -> String ;
517+ fn after_spaces ( & self , spaces : usize ) -> String ;
518+ fn before_spaces ( & self , spaces : usize ) -> String ;
515519}
516520
517521impl Formatter for str {
518- fn after_spaces < ' f > ( & self , spaces : usize ) -> String {
522+ fn after_spaces ( & self , spaces : usize ) -> String {
519523 let mut r = String :: new ( ) ;
520524 r. push_str ( self ) ;
521525 r. push_str ( & " " . repeat ( spaces) ) ;
522526 r
523527 }
524528
525- fn before_spaces < ' f > ( & self , spaces : usize ) -> String {
529+ fn before_spaces ( & self , spaces : usize ) -> String {
526530 let mut r = String :: new ( ) ;
527531 r. push_str ( & " " . repeat ( spaces) ) ;
528532 r. push_str ( self ) ;
0 commit comments