@@ -305,7 +305,7 @@ impl Region {
305305 let mut idents: Vec < _ > = self
306306 . rbfs
307307 . 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) )
309309 . collect ( ) ;
310310 if idents. is_empty ( ) {
311311 return None ;
@@ -343,7 +343,7 @@ impl Region {
343343 let idents: Vec < _ > = self
344344 . rbfs
345345 . 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) )
347347 . collect ( ) ;
348348
349349 if idents. is_empty ( ) {
@@ -726,7 +726,7 @@ fn check_erc_derive_infos(
726726 } ;
727727 match register {
728728 Register :: Single ( _) => {
729- let ty_name = info_name. to_string ( ) ;
729+ let ty_name = info_name. clone ( ) ;
730730 * derive_info = match explicit_rpath {
731731 None => {
732732 match compare_this_against_prev (
@@ -758,7 +758,7 @@ fn check_erc_derive_infos(
758758 let re = Regex :: new ( format ! ( "^{re_string}$" ) . as_str ( ) ) . map_err ( |_| {
759759 anyhow ! ( "Error creating regex for register {}" , register. name)
760760 } ) ?;
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
762762 * derive_info = match explicit_rpath {
763763 None => {
764764 match compare_this_against_prev (
@@ -787,7 +787,7 @@ fn check_erc_derive_infos(
787787 }
788788 RegisterCluster :: Cluster ( cluster) => {
789789 * 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) ) ;
791791 }
792792 } ;
793793 }
0 commit comments