From f3c9676493af506a87c4b374570c673e2436ab98 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Tue, 2 Jul 2024 15:07:11 +0800 Subject: [PATCH] Fix clippy --- .../cgp-component-macro-lib/src/delegate_components/define.rs | 2 +- .../src/delegate_components/merge_generics.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/cgp-component-macro-lib/src/delegate_components/define.rs b/crates/cgp-component-macro-lib/src/delegate_components/define.rs index 6ddf200..b1a6a2c 100644 --- a/crates/cgp-component-macro-lib/src/delegate_components/define.rs +++ b/crates/cgp-component-macro-lib/src/delegate_components/define.rs @@ -35,7 +35,7 @@ pub fn define_components(body: TokenStream) -> TokenStream { } { - let delegates_to_trait_name = format!("DelegatesTo{}", ast.components_ident.to_string(),); + let delegates_to_trait_name = format!("DelegatesTo{}", ast.components_ident); let (delegates_to_trait, delegates_to_impl) = define_delegates_to_trait( &Ident::new(&delegates_to_trait_name, Span::call_site()), diff --git a/crates/cgp-component-macro-lib/src/delegate_components/merge_generics.rs b/crates/cgp-component-macro-lib/src/delegate_components/merge_generics.rs index f285f8d..afa9df1 100644 --- a/crates/cgp-component-macro-lib/src/delegate_components/merge_generics.rs +++ b/crates/cgp-component-macro-lib/src/delegate_components/merge_generics.rs @@ -26,9 +26,9 @@ pub fn merge_generics(generics_a: &Generics, generics_b: &Generics) -> Generics }; Generics { - lt_token: generics_a.lt_token.clone(), + lt_token: generics_a.lt_token, params, - gt_token: generics_a.gt_token.clone(), + gt_token: generics_a.gt_token, where_clause, } }