@@ -23,7 +23,7 @@ fn file_creator(
2323 path_buffer. push ( std:: env:: var ( "CARGO_MANIFEST_DIR" ) . unwrap ( ) ) ;
2424 path_buffer. push ( Path :: new ( CACHE_ROOT ) ) ;
2525 path_buffer. push ( Path :: new ( folder) ) ;
26- path_buffer. push ( Path :: new ( & format ! ( "{}.{}" , name , extension ) ) ) ;
26+ path_buffer. push ( Path :: new ( & format ! ( "{name }.{extension}" ) ) ) ;
2727 let mut options = OpenOptions :: new ( ) ;
2828 let file = options
2929 . read ( true )
@@ -287,7 +287,7 @@ pub(crate) fn compare_enum_cache(
287287 }
288288 let enum_name = match mod_name {
289289 Some ( n) => {
290- format ! ( "{}_{}" , n , name )
290+ format ! ( "{n }_{name}" )
291291 }
292292 None => name,
293293 } ;
@@ -448,10 +448,7 @@ pub(crate) fn compare_enum_cache(
448448 let mut file = file_creator ( "enum" , & enum_name, EXTENSION , true , true ) . unwrap ( ) ;
449449 file. write_all ( next_cache_toml. as_bytes ( ) )
450450 . unwrap_or_else ( |_| {
451- panic ! (
452- "[CompatibilityEnumCheck] {:?}.{:?}: write cache error" ,
453- enum_name, EXTENSION
454- )
451+ panic ! ( "[CompatibilityEnumCheck] {enum_name:?}.{EXTENSION:?}: write cache error" )
455452 } ) ;
456453 }
457454
@@ -501,7 +498,7 @@ pub(crate) fn compare_struct_cache(
501498 token,
502499 } = input;
503500 let struct_name = match mod_name {
504- Some ( n) => format ! ( "{}_{}" , n , name ) ,
501+ Some ( n) => format ! ( "{n }_{name}" ) ,
505502 None => name,
506503 } ;
507504 // open or create cache
@@ -539,8 +536,7 @@ pub(crate) fn compare_struct_cache(
539536 return Err ( Error :: new (
540537 Span :: call_site ( ) ,
541538 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:?}"
544540 )
545541 ) ) ;
546542 }
@@ -553,8 +549,7 @@ pub(crate) fn compare_struct_cache(
553549 file. write_all ( next_cache_toml. as_bytes ( ) )
554550 . unwrap_or_else ( |_| {
555551 panic ! (
556- "[CompatibilityStructCheck] {:?}.{:?}: write cache error" ,
557- struct_name, EXTENSION
552+ "[CompatibilityStructCheck] {struct_name:?}.{EXTENSION:?}: write cache error"
558553 )
559554 } ) ;
560555 }
0 commit comments