From c721bd3dafc1de6c7a544e4fcee0fa2606ed92c5 Mon Sep 17 00:00:00 2001 From: "Lan, Jian" Date: Fri, 13 Feb 2026 17:30:47 +0800 Subject: [PATCH 1/2] ci: add job to run tests without default features --- .github/workflows/ci.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 From eb3dc1775282237075b567bfe68116fd5556e7b1 Mon Sep 17 00:00:00 2001 From: "Lan, Jian" Date: Sun, 15 Feb 2026 01:33:45 +0800 Subject: [PATCH 2/2] fix: adjust placement of `where` clause in generated tuple struct definitions --- patchable-macro/src/context.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;