File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
const-type-layout-derive/src Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -452,9 +452,9 @@ fn quote_fields(
452
452
453
453
let ident = syn:: Ident :: new (
454
454
& ( if let Some ( qualifier) = qualifier {
455
- format ! ( "__{}_{}_fields" , ty_name , qualifier )
455
+ format ! ( "__{ty_name }_{qualifier }_fields" )
456
456
} else {
457
- format ! ( "__{}_fields" , ty_name )
457
+ format ! ( "__{ty_name }_fields" )
458
458
} )
459
459
. to_uppercase ( ) ,
460
460
ty_name. span ( ) ,
@@ -681,7 +681,7 @@ fn quote_discriminant_bytes(
681
681
consts : & mut Vec < proc_macro2:: TokenStream > ,
682
682
) -> proc_macro2:: TokenStream {
683
683
let ident = syn:: Ident :: new (
684
- & format ! ( "__{}_{}_discriminant" , ty_name , variant_name ) . to_uppercase ( ) ,
684
+ & format ! ( "__{ty_name }_{variant_name }_discriminant" ) . to_uppercase ( ) ,
685
685
ty_name. span ( ) ,
686
686
) ;
687
687
@@ -722,7 +722,7 @@ fn quote_variants(
722
722
let variants_len = variants. len ( ) ;
723
723
724
724
let ident = syn:: Ident :: new (
725
- & format ! ( "__{}_variants" , ty_name ) . to_uppercase ( ) ,
725
+ & format ! ( "__{ty_name }_variants" ) . to_uppercase ( ) ,
726
726
ty_name. span ( ) ,
727
727
) ;
728
728
Original file line number Diff line number Diff line change @@ -441,7 +441,7 @@ impl<'a> fmt::Debug for Discriminant<'a> {
441
441
if byte != 0_u8 {
442
442
is_zero = false ;
443
443
444
- write ! ( fmt, "{:x}" , byte ) ?;
444
+ write ! ( fmt, "{byte :x}" ) ?;
445
445
}
446
446
}
447
447
Original file line number Diff line number Diff line change @@ -110,10 +110,10 @@ fn main() {
110
110
let part: Vec < u8 > = std:: ascii:: escape_default ( b) . collect ( ) ;
111
111
ascii_escaped_layout. push_str ( std:: str:: from_utf8 ( & part) . unwrap ( ) ) ;
112
112
}
113
- println ! ( "{}" , ascii_escaped_layout ) ;
113
+ println ! ( "{ascii_escaped_layout}" ) ;
114
114
115
115
let ron_layout = ron:: to_string ( & <List < u8 > >:: TYPE_GRAPH ) . unwrap ( ) ;
116
- println ! ( "{}" , ron_layout ) ;
116
+ println ! ( "{ron_layout}" ) ;
117
117
}
118
118
119
119
const SERIALISED_LIST_U8_LAYOUT : [ u8 ; const_type_layout:: serialised_type_graph_len :: < List < u8 > > ( ) ] =
You can’t perform that action at this time.
0 commit comments