diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d770bdd..51197ec 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,8 +26,11 @@ jobs: - name: Run clippy run: cargo clippy --verbose - - name: Run tests without feature impl_from + - name: Run tests with default features (support serde) run: cargo test --verbose --package patchable + - name: Run tests without default feature + run: cargo test --verbose --package patchable --no-default-features + - name: cargo test with feature impl_from run: cargo test --verbose --package patchable --features impl_from diff --git a/patchable-macro/src/context.rs b/patchable-macro/src/context.rs index 5a521fd..12369d6 100644 --- a/patchable-macro/src/context.rs +++ b/patchable-macro/src/context.rs @@ -153,7 +153,7 @@ impl<'a> MacroContext<'a> { let patch_fields = self.generate_patch_fields(); let body = self.select_fields( quote! { #generic_params #where_clause { #(#patch_fields),* } }, - quote! { #generic_params #where_clause ( #(#patch_fields),* ); }, + quote! { #generic_params ( #(#patch_fields),* ) #where_clause; }, quote! {;}, ); let patch_name = &self.patch_struct_name;