@@ -214,20 +214,20 @@ mod test {
214214 impl Display for InstructionPart < ' _ > {
215215 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
216216 match self {
217- InstructionPart :: Basic ( s) => write ! ( f , "{}" , s) ,
218- InstructionPart :: Opcode ( s, _o) => write ! ( f, "{} " , s ) ,
219- InstructionPart :: Arg ( arg) => write ! ( f, "{}" , arg ) ,
220- InstructionPart :: Separator => write ! ( f , ", " ) ,
217+ InstructionPart :: Basic ( s) => f . write_str ( s) ,
218+ InstructionPart :: Opcode ( s, _o) => write ! ( f, "{s } " ) ,
219+ InstructionPart :: Arg ( arg) => write ! ( f, "{arg}" ) ,
220+ InstructionPart :: Separator => f . write_str ( ", " ) ,
221221 }
222222 }
223223 }
224224
225225 impl Display for InstructionArg < ' _ > {
226226 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
227227 match self {
228- InstructionArg :: Value ( v) => write ! ( f, "{}" , v ) ,
229- InstructionArg :: BranchDest ( v) => write ! ( f, "{}" , v ) ,
230- InstructionArg :: Reloc => write ! ( f , "reloc" ) ,
228+ InstructionArg :: Value ( v) => write ! ( f, "{v}" ) ,
229+ InstructionArg :: BranchDest ( v) => write ! ( f, "{v}" ) ,
230+ InstructionArg :: Reloc => f . write_str ( "reloc" ) ,
231231 }
232232 }
233233 }
@@ -264,7 +264,7 @@ mod test {
264264 )
265265 . unwrap ( ) ;
266266
267- let joined_str: String = parts. iter ( ) . map ( |part| format ! ( "{}" , part ) ) . collect ( ) ;
267+ let joined_str: String = parts. iter ( ) . map ( < _ > :: to_string ) . collect ( ) ;
268268 assert_eq ! ( joined_str, expected_str. to_string( ) ) ;
269269 }
270270 }
@@ -342,7 +342,7 @@ mod test {
342342 )
343343 . unwrap ( ) ;
344344
345- let joined_str: String = parts. iter ( ) . map ( |part| format ! ( "{}" , part ) ) . collect ( ) ;
345+ let joined_str: String = parts. iter ( ) . map ( < _ > :: to_string ) . collect ( ) ;
346346 assert_eq ! ( joined_str, expected_str. to_string( ) ) ;
347347 }
348348 }
@@ -425,7 +425,7 @@ mod test {
425425 )
426426 . unwrap ( ) ;
427427
428- let joined_str: String = parts. iter ( ) . map ( |part| format ! ( "{}" , part ) ) . collect ( ) ;
428+ let joined_str: String = parts. iter ( ) . map ( < _ > :: to_string ) . collect ( ) ;
429429 assert_eq ! ( joined_str, expected_str. to_string( ) ) ;
430430 }
431431 }
@@ -462,7 +462,7 @@ mod test {
462462 )
463463 . unwrap ( ) ;
464464
465- let joined_str: String = parts. iter ( ) . map ( |part| format ! ( "{}" , part ) ) . collect ( ) ;
465+ let joined_str: String = parts. iter ( ) . map ( < _ > :: to_string ) . collect ( ) ;
466466 assert_eq ! ( joined_str, expected_str. to_string( ) ) ;
467467 }
468468 }
@@ -516,7 +516,7 @@ mod test {
516516 )
517517 . unwrap ( ) ;
518518
519- let joined_str: String = parts. iter ( ) . map ( |part| format ! ( "{}" , part ) ) . collect ( ) ;
519+ let joined_str: String = parts. iter ( ) . map ( < _ > :: to_string ) . collect ( ) ;
520520 assert_eq ! ( joined_str, expected_str. to_string( ) ) ;
521521 }
522522 }
@@ -557,7 +557,7 @@ mod test {
557557 )
558558 . unwrap ( ) ;
559559
560- let joined_str: String = parts. iter ( ) . map ( |part| format ! ( "{}" , part ) ) . collect ( ) ;
560+ let joined_str: String = parts. iter ( ) . map ( < _ > :: to_string ) . collect ( ) ;
561561 assert_eq ! ( joined_str, expected_str. to_string( ) ) ;
562562 }
563563 }
@@ -601,7 +601,7 @@ mod test {
601601 )
602602 . unwrap ( ) ;
603603
604- let joined_str: String = parts. iter ( ) . map ( |part| format ! ( "{}" , part ) ) . collect ( ) ;
604+ let joined_str: String = parts. iter ( ) . map ( < _ > :: to_string ) . collect ( ) ;
605605 assert_eq ! ( joined_str, expected_str. to_string( ) ) ;
606606 }
607607 }
@@ -645,7 +645,7 @@ mod test {
645645 )
646646 . unwrap ( ) ;
647647
648- let joined_str: String = parts. iter ( ) . map ( |part| format ! ( "{}" , part ) ) . collect ( ) ;
648+ let joined_str: String = parts. iter ( ) . map ( < _ > :: to_string ) . collect ( ) ;
649649 assert_eq ! ( joined_str, expected_str. to_string( ) ) ;
650650 }
651651 }
@@ -682,7 +682,7 @@ mod test {
682682 )
683683 . unwrap ( ) ;
684684
685- let joined_str: String = parts. iter ( ) . map ( |part| format ! ( "{}" , part ) ) . collect ( ) ;
685+ let joined_str: String = parts. iter ( ) . map ( < _ > :: to_string ) . collect ( ) ;
686686 assert_eq ! ( joined_str, expected_str. to_string( ) ) ;
687687 }
688688 }
@@ -716,7 +716,7 @@ mod test {
716716 )
717717 . unwrap ( ) ;
718718
719- let joined_str: String = parts. iter ( ) . map ( |part| format ! ( "{}" , part ) ) . collect ( ) ;
719+ let joined_str: String = parts. iter ( ) . map ( < _ > :: to_string ) . collect ( ) ;
720720 assert_eq ! ( joined_str, expected_str. to_string( ) ) ;
721721 }
722722 }
@@ -764,7 +764,7 @@ mod test {
764764 )
765765 . unwrap ( ) ;
766766
767- let joined_str: String = parts. iter ( ) . map ( |part| format ! ( "{}" , part ) ) . collect ( ) ;
767+ let joined_str: String = parts. iter ( ) . map ( < _ > :: to_string ) . collect ( ) ;
768768 assert_eq ! ( joined_str, expected_str. to_string( ) ) ;
769769 }
770770 }
@@ -814,7 +814,7 @@ mod test {
814814 )
815815 . unwrap ( ) ;
816816
817- let joined_str: String = parts. iter ( ) . map ( |part| format ! ( "{}" , part ) ) . collect ( ) ;
817+ let joined_str: String = parts. iter ( ) . map ( < _ > :: to_string ) . collect ( ) ;
818818 assert_eq ! ( joined_str, expected_str. to_string( ) ) ;
819819 }
820820 }
0 commit comments