@@ -23,7 +23,7 @@ fn file_creator(
23
23
path_buffer. push ( std:: env:: var ( "CARGO_MANIFEST_DIR" ) . unwrap ( ) ) ;
24
24
path_buffer. push ( Path :: new ( CACHE_ROOT ) ) ;
25
25
path_buffer. push ( Path :: new ( folder) ) ;
26
- path_buffer. push ( Path :: new ( & format ! ( "{}.{}" , name , extension ) ) ) ;
26
+ path_buffer. push ( Path :: new ( & format ! ( "{name }.{extension}" ) ) ) ;
27
27
let mut options = OpenOptions :: new ( ) ;
28
28
let file = options
29
29
. read ( true )
@@ -287,7 +287,7 @@ pub(crate) fn compare_enum_cache(
287
287
}
288
288
let enum_name = match mod_name {
289
289
Some ( n) => {
290
- format ! ( "{}_{}" , n , name )
290
+ format ! ( "{n }_{name}" )
291
291
}
292
292
None => name,
293
293
} ;
@@ -448,10 +448,7 @@ pub(crate) fn compare_enum_cache(
448
448
let mut file = file_creator ( "enum" , & enum_name, EXTENSION , true , true ) . unwrap ( ) ;
449
449
file. write_all ( next_cache_toml. as_bytes ( ) )
450
450
. unwrap_or_else ( |_| {
451
- panic ! (
452
- "[CompatibilityEnumCheck] {:?}.{:?}: write cache error" ,
453
- enum_name, EXTENSION
454
- )
451
+ panic ! ( "[CompatibilityEnumCheck] {enum_name:?}.{EXTENSION:?}: write cache error" )
455
452
} ) ;
456
453
}
457
454
@@ -501,7 +498,7 @@ pub(crate) fn compare_struct_cache(
501
498
token,
502
499
} = input;
503
500
let struct_name = match mod_name {
504
- Some ( n) => format ! ( "{}_{}" , n , name ) ,
501
+ Some ( n) => format ! ( "{n }_{name}" ) ,
505
502
None => name,
506
503
} ;
507
504
// open or create cache
@@ -539,8 +536,7 @@ pub(crate) fn compare_struct_cache(
539
536
return Err ( Error :: new (
540
537
Span :: call_site ( ) ,
541
538
format ! (
542
- "[CompatibilityStructCheck: 2001] struct {:?}, cache_fields: {:?}, cur_fields: {:?}, idx: {:?}" ,
543
- struct_name, prev, next, idx
539
+ "[CompatibilityStructCheck: 2001] struct {struct_name:?}, cache_fields: {prev:?}, cur_fields: {next:?}, idx: {idx:?}"
544
540
)
545
541
) ) ;
546
542
}
@@ -553,8 +549,7 @@ pub(crate) fn compare_struct_cache(
553
549
file. write_all ( next_cache_toml. as_bytes ( ) )
554
550
. unwrap_or_else ( |_| {
555
551
panic ! (
556
- "[CompatibilityStructCheck] {:?}.{:?}: write cache error" ,
557
- struct_name, EXTENSION
552
+ "[CompatibilityStructCheck] {struct_name:?}.{EXTENSION:?}: write cache error"
558
553
)
559
554
} ) ;
560
555
}
0 commit comments