From cd5756b61d0ff32bba2d8a2cdff4af40b5de87b7 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Tue, 9 Jan 2024 03:07:22 +0100 Subject: [PATCH] Fix formatting --- crates/cgp-component-macro/src/helper/consumer_impl.rs | 2 +- crates/cgp-component-macro/src/helper/provider_impl.rs | 1 - crates/cgp-component-macro/src/tests/basic.rs | 4 ++-- crates/cgp-component-macro/src/tests/const_generic.rs | 4 ++-- crates/cgp-component-macro/src/tests/mod.rs | 3 +-- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/crates/cgp-component-macro/src/helper/consumer_impl.rs b/crates/cgp-component-macro/src/helper/consumer_impl.rs index 2ef94b6..9b3b397 100644 --- a/crates/cgp-component-macro/src/helper/consumer_impl.rs +++ b/crates/cgp-component-macro/src/helper/consumer_impl.rs @@ -1,5 +1,5 @@ use syn::punctuated::Punctuated; -use syn::token::{Brace, For, Impl, Plus, Comma}; +use syn::token::{Brace, Comma, For, Impl, Plus}; use syn::{ parse_quote, GenericParam, Ident, ImplItem, ItemImpl, ItemTrait, Path, TraitItem, TypeParamBound, diff --git a/crates/cgp-component-macro/src/helper/provider_impl.rs b/crates/cgp-component-macro/src/helper/provider_impl.rs index 6e9f447..23b3e1a 100644 --- a/crates/cgp-component-macro/src/helper/provider_impl.rs +++ b/crates/cgp-component-macro/src/helper/provider_impl.rs @@ -38,7 +38,6 @@ pub fn derive_provider_impl( generic_args }; - let impl_generics = { let mut impl_generics = provider_trait.generics.clone(); diff --git a/crates/cgp-component-macro/src/tests/basic.rs b/crates/cgp-component-macro/src/tests/basic.rs index 66ebdc0..7d6e9e4 100644 --- a/crates/cgp-component-macro/src/tests/basic.rs +++ b/crates/cgp-component-macro/src/tests/basic.rs @@ -11,6 +11,6 @@ fn test_basic_derive_component() { fn foo(&self) -> Self::Foo; } - } + }, ); -} \ No newline at end of file +} diff --git a/crates/cgp-component-macro/src/tests/const_generic.rs b/crates/cgp-component-macro/src/tests/const_generic.rs index 293883d..74409e6 100644 --- a/crates/cgp-component-macro/src/tests/const_generic.rs +++ b/crates/cgp-component-macro/src/tests/const_generic.rs @@ -11,6 +11,6 @@ fn test_derive_component_with_const_generic() { fn foo(&self) -> Self::Foo; } - } + }, ); -} \ No newline at end of file +} diff --git a/crates/cgp-component-macro/src/tests/mod.rs b/crates/cgp-component-macro/src/tests/mod.rs index 89ab7f7..5e9588d 100644 --- a/crates/cgp-component-macro/src/tests/mod.rs +++ b/crates/cgp-component-macro/src/tests/mod.rs @@ -1,3 +1,2 @@ - pub mod basic; -pub mod const_generic; \ No newline at end of file +pub mod const_generic;