From 39d66182f0290bacc10886c2659874bd9edc2d4b Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Tue, 19 May 2026 22:48:23 +0800 Subject: Add `empty_result!` macro and `REPL` resource, improve examples --- CHANGELOG.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index a9738ff..e10c307 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,22 @@ None ### Optimizings: None -#### Features: -None +1. **\[macros\]** Added the `empty_result!()` macro for early return from a chain function. This macro is a shorthand for constructing an `EmptyResult` and converting it into a `ChainProcess`, signaling to the pipeline that there is no meaningful output to continue processing. + +```rust +use mingling::macros::empty_result; + +#[chain] +fn maybe_skip(prev: SomeEntry) -> Next { + if should_skip() { + return empty_result!(); + } + // ... continue processing + NextEntry::new(result) +} +``` + +Expands to: `crate::EmptyResult::new(()).to_chain()` #### **BREAKING CHANGES**: 1. **\[core\]** Panic Unwind will not be supported when the `async` feature is enabled -- cgit