diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-26 07:19:44 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-26 07:19:44 +0800 |
| commit | 8a796ecbe4d8edb9c8e67b9fc44028d3778113ab (patch) | |
| tree | 7ecdcc690ec7dae783a8ca47b95983210f005a72 /CHANGELOG.md | |
| parent | d1a74ce57e5be72436376a829e9c7e1e7c1c561b (diff) | |
feat(macros): simplify ResultEmpty to a unit struct
Diffstat (limited to 'CHANGELOG.md')
| -rw-r--r-- | CHANGELOG.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bee517..de97204 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -380,6 +380,14 @@ let value = route!(prev.pick_or_route((), Error::default()).unpack()); 9. **\[core\]** **\[structural_renderer\]** Added `mingling::__private::StructuralDataSealed` and `mingling::__private::StructuralData` (re-exported from `mingling_core::renderer::structural::structural_data`) to support the sealed trait pattern. The `StructuralData` trait is only implementable via the derive macro or the `_structural` macro variants. +10. **\[macros\]** Changed `ResultEmpty` from a tuple struct (wrapping `()`) to a fieldless unit struct. `ResultEmpty::new(())` is now simply `ResultEmpty`. This simplifies construction and reduces generated code. + +- `pack!(ResultEmpty = ())` → `#[derive(...)] pub struct ResultEmpty;` +- `crate::ResultEmpty::new(())` → `crate::ResultEmpty` +- Updated all references in `#[chain]` code generation, `empty_result!()` macro, and `program_fallback_gen`/`program_final_gen` accordingly. + +When the `structural_renderer` feature is enabled, `ResultEmpty` also derives `Serialize` and `StructuralData` for consistency with structured output support. + ### Release 0.1.9 (2026-05-29) #### Fixes: |
