File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -598,11 +598,9 @@ fn gen_log(
598598
599599// fn(a: usize, b: usize) => "a = {a:?}, b = {b:?}"
600600fn gen_input_format ( sig : & Signature ) -> String {
601- let mut input_format = String :: new ( ) ;
602- for ( i, input) in sig. inputs . iter ( ) . enumerate ( ) {
603- if i > 0 {
604- input_format. push_str ( ", " ) ;
605- }
601+ let mut args = vec ! [ ] ;
602+
603+ for input in & sig. inputs {
606604 match input {
607605 FnArg :: Typed ( PatType { pat, .. } ) => {
608606 if let Pat :: Ident ( pat_ident) = & * * pat {
@@ -611,15 +609,16 @@ fn gen_input_format(sig: &Signature) -> String {
611609 if ident. starts_with ( "__arg" ) {
612610 continue ;
613611 }
614- input_format . push_str ( & format ! ( "{ident} = {{{ident}:?}}" ) ) ;
612+ args . push ( format ! ( "{ident} = {{{ident}:?}}" ) ) ;
615613 }
616614 }
617615 FnArg :: Receiver ( _) => {
618- input_format . push_str ( "self" ) ;
616+ args . push ( "self" . to_string ( ) ) ;
619617 }
620618 }
621619 }
622- input_format
620+
621+ args. join ( ", " )
623622}
624623
625624fn gen_output_format ( ) -> String {
You can’t perform that action at this time.
0 commit comments