@@ -201,11 +201,11 @@ impl Arbitrary for DeclarationC {
201201impl fmt:: Display for DeclarationC {
202202 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
203203 match * self {
204- DeclarationC :: FunctionPtrDecl ( ref d) => write ! ( f, "{}" , d ) ,
205- DeclarationC :: StructDecl ( ref d) => write ! ( f, "{}" , d ) ,
206- DeclarationC :: UnionDecl ( ref d) => write ! ( f, "{}" , d ) ,
207- DeclarationC :: VariableDecl ( ref d) => write ! ( f, "{}" , d ) ,
208- DeclarationC :: FunctionDecl ( ref d) => write ! ( f, "{}" , d ) ,
204+ DeclarationC :: FunctionPtrDecl ( ref d) => write ! ( f, "{d}" ) ,
205+ DeclarationC :: StructDecl ( ref d) => write ! ( f, "{d}" ) ,
206+ DeclarationC :: UnionDecl ( ref d) => write ! ( f, "{d}" ) ,
207+ DeclarationC :: VariableDecl ( ref d) => write ! ( f, "{d}" ) ,
208+ DeclarationC :: FunctionDecl ( ref d) => write ! ( f, "{d}" ) ,
209209 }
210210 }
211211}
@@ -225,9 +225,9 @@ impl fmt::Display for DeclarationListC {
225225 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
226226 let mut display = String :: new ( ) ;
227227 for decl in & self . decls {
228- display += & format ! ( "{}" , decl ) ;
228+ display += & format ! ( "{decl}" ) ;
229229 }
230- write ! ( f, "{}" , display )
230+ write ! ( f, "{display}" )
231231 }
232232}
233233
@@ -347,7 +347,7 @@ impl fmt::Display for ArrayDimensionC {
347347/// identifiers unique.
348348impl MakeUnique for BasicTypeDeclarationC {
349349 fn make_unique ( & mut self , stamp : usize ) {
350- self . ident_id += & format ! ( "_{}" , stamp ) ;
350+ self . ident_id += & format ! ( "_{stamp}" ) ;
351351 }
352352}
353353
@@ -384,7 +384,7 @@ impl fmt::Display for BasicTypeDeclarationC {
384384/// identifiers unique.
385385impl MakeUnique for StructDeclarationC {
386386 fn make_unique ( & mut self , stamp : usize ) {
387- self . ident_id += & format ! ( "_{}" , stamp ) ;
387+ self . ident_id += & format ! ( "_{stamp}" ) ;
388388 }
389389}
390390
@@ -432,7 +432,7 @@ impl fmt::Display for StructDeclarationC {
432432/// identifiers unique.
433433impl MakeUnique for UnionDeclarationC {
434434 fn make_unique ( & mut self , stamp : usize ) {
435- self . ident_id += & format ! ( "_{}" , stamp ) ;
435+ self . ident_id += & format ! ( "_{stamp}" ) ;
436436 }
437437}
438438
@@ -480,7 +480,7 @@ impl fmt::Display for UnionDeclarationC {
480480/// FunctionPointerDeclarationC identifiers unique.
481481impl MakeUnique for FunctionPointerDeclarationC {
482482 fn make_unique ( & mut self , stamp : usize ) {
483- self . ident_id += & format ! ( "_{}" , stamp ) ;
483+ self . ident_id += & format ! ( "_{stamp}" ) ;
484484 }
485485}
486486
@@ -517,7 +517,7 @@ impl fmt::Display for FunctionPointerDeclarationC {
517517/// identifiers unique.
518518impl MakeUnique for FunctionPrototypeC {
519519 fn make_unique ( & mut self , stamp : usize ) {
520- self . ident_id += & format ! ( "_{}" , stamp ) ;
520+ self . ident_id += & format ! ( "_{stamp}" ) ;
521521 }
522522}
523523
@@ -589,11 +589,11 @@ impl fmt::Display for ParameterListC {
589589 let mut display = String :: new ( ) ;
590590 for ( i, p) in self . params . iter ( ) . enumerate ( ) {
591591 match i {
592- 0 => display += & format ! ( "{}" , p ) ,
593- _ => display += & format ! ( ",{}" , p ) ,
592+ 0 => display += & format ! ( "{p}" ) ,
593+ _ => display += & format ! ( ",{p}" ) ,
594594 }
595595 }
596- write ! ( f, "{}" , display )
596+ write ! ( f, "{display}" )
597597 }
598598}
599599
@@ -614,17 +614,17 @@ impl fmt::Display for HeaderC {
614614 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
615615 let mut display = String :: new ( ) ;
616616 for decl in & self . def . decls {
617- display += & format ! ( "{}" , decl ) ;
617+ display += & format ! ( "{decl}" ) ;
618618 }
619- write ! ( f, "{}" , display )
619+ write ! ( f, "{display}" )
620620 }
621621}
622622
623623/// Use Display trait for Debug so that any failing property tests report
624624/// generated C code rather than the data structures that contain it.
625625impl fmt:: Debug for HeaderC {
626626 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
627- write ! ( f, "{}" , self )
627+ write ! ( f, "{self}" )
628628 }
629629}
630630
0 commit comments