@@ -63,7 +63,7 @@ pub fn cols_ref_impl(
6363 . collect_vec ( ) ;
6464
6565 // The ColsRef struct is named by appending `Ref` to the struct name
66- let const_cols_ref_name = syn:: Ident :: new ( & format ! ( "{}Ref" , ident ) , ident. span ( ) ) ;
66+ let const_cols_ref_name = syn:: Ident :: new ( & format ! ( "{ident }Ref" ) , ident. span ( ) ) ;
6767
6868 // the args to the `from` method will be different for the ColsRef and ColsRefMut
6969 // structs
@@ -94,7 +94,7 @@ pub fn cols_ref_impl(
9494 . collect_vec ( ) ;
9595
9696 // The ColsRefMut struct is named by appending `RefMut` to the struct name
97- let mut_cols_ref_name = syn:: Ident :: new ( & format ! ( "{}RefMut" , ident ) , ident. span ( ) ) ;
97+ let mut_cols_ref_name = syn:: Ident :: new ( & format ! ( "{ident }RefMut" ) , ident. span ( ) ) ;
9898
9999 // the args to the `from` method will be different for the ColsRef and ColsRefMut
100100 // structs
@@ -642,7 +642,7 @@ fn get_const_cols_ref_type(
642642 lifetime : syn:: Lifetime ,
643643) -> syn:: TypePath {
644644 if !is_columns_struct ( ty) {
645- panic ! ( "Expected a columns struct, got {:?}" , ty ) ;
645+ panic ! ( "Expected a columns struct, got {ty :?}" ) ;
646646 }
647647
648648 if let syn:: Type :: Path ( type_path) = ty {
@@ -654,21 +654,18 @@ fn get_const_cols_ref_type(
654654 } ;
655655 const_cols_ref_type
656656 } else {
657- panic ! ( "is_columns_struct returned true for type {:?} but the last segment is not a columns struct" , ty ) ;
657+ panic ! ( "is_columns_struct returned true for type {ty :?} but the last segment is not a columns struct" ) ;
658658 }
659659 } else {
660- panic ! (
661- "is_columns_struct returned true but the type {:?} is not a path" ,
662- ty
663- ) ;
660+ panic ! ( "is_columns_struct returned true but the type {ty:?} is not a path" , ) ;
664661 }
665662}
666663
667664// If 'ty' is a struct that derives ColsRef, return the ColsRefMut struct type
668665// Otherwise, return None
669666fn get_mut_cols_ref_type ( ty : & syn:: Type , generic_type : & syn:: TypeParam ) -> syn:: TypePath {
670667 if !is_columns_struct ( ty) {
671- panic ! ( "Expected a columns struct, got {:?}" , ty ) ;
668+ panic ! ( "Expected a columns struct, got {ty :?}" ) ;
672669 }
673670
674671 if let syn:: Type :: Path ( type_path) = ty {
@@ -680,13 +677,10 @@ fn get_mut_cols_ref_type(ty: &syn::Type, generic_type: &syn::TypeParam) -> syn::
680677 } ;
681678 mut_cols_ref_type
682679 } else {
683- panic ! ( "is_columns_struct returned true for type {:?} but the last segment is not a columns struct" , ty ) ;
680+ panic ! ( "is_columns_struct returned true for type {ty :?} but the last segment is not a columns struct" ) ;
684681 }
685682 } else {
686- panic ! (
687- "is_columns_struct returned true but the type {:?} is not a path" ,
688- ty
689- ) ;
683+ panic ! ( "is_columns_struct returned true but the type {ty:?} is not a path" , ) ;
690684 }
691685}
692686
0 commit comments