@@ -305,7 +305,7 @@ impl Region {
305
305
let mut idents: Vec < _ > = self
306
306
. rbfs
307
307
. iter ( )
308
- . filter_map ( |f| f. syn_field . ident . as_ref ( ) . map ( |ident| ident . to_string ( ) ) )
308
+ . filter_map ( |f| f. syn_field . ident . as_ref ( ) . map ( ToString :: to_string) )
309
309
. collect ( ) ;
310
310
if idents. is_empty ( ) {
311
311
return None ;
@@ -343,7 +343,7 @@ impl Region {
343
343
let idents: Vec < _ > = self
344
344
. rbfs
345
345
. iter ( )
346
- . filter_map ( |f| f. syn_field . ident . as_ref ( ) . map ( |ident| ident . to_string ( ) ) )
346
+ . filter_map ( |f| f. syn_field . ident . as_ref ( ) . map ( ToString :: to_string) )
347
347
. collect ( ) ;
348
348
349
349
if idents. is_empty ( ) {
@@ -726,7 +726,7 @@ fn check_erc_derive_infos(
726
726
} ;
727
727
match register {
728
728
Register :: Single ( _) => {
729
- let ty_name = info_name. to_string ( ) ;
729
+ let ty_name = info_name. clone ( ) ;
730
730
* derive_info = match explicit_rpath {
731
731
None => {
732
732
match compare_this_against_prev (
@@ -758,7 +758,7 @@ fn check_erc_derive_infos(
758
758
let re = Regex :: new ( format ! ( "^{re_string}$" ) . as_str ( ) ) . map_err ( |_| {
759
759
anyhow ! ( "Error creating regex for register {}" , register. name)
760
760
} ) ?;
761
- let ty_name = info_name. to_string ( ) ; // keep suffix for regex matching
761
+ let ty_name = info_name. clone ( ) ; // keep suffix for regex matching
762
762
* derive_info = match explicit_rpath {
763
763
None => {
764
764
match compare_this_against_prev (
@@ -787,7 +787,7 @@ fn check_erc_derive_infos(
787
787
}
788
788
RegisterCluster :: Cluster ( cluster) => {
789
789
* derive_info = DeriveInfo :: Cluster ;
790
- ercs_type_info. push ( ( cluster. name . to_string ( ) , None , erc, derive_info) ) ;
790
+ ercs_type_info. push ( ( cluster. name . clone ( ) , None , erc, derive_info) ) ;
791
791
}
792
792
} ;
793
793
}
0 commit comments