aboutsummaryrefslogtreecommitdiff
path: root/CHANGELOG.md
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-06-22 23:59:31 +0800
committer魏曹先生 <1992414357@qq.com>2026-06-22 23:59:31 +0800
commit443ffe86485519a218997955335cde142733f88f (patch)
treeef331749338c8653ac8a241bfd1cf83cd0683468 /CHANGELOG.md
parent31b5abfc96013309530025b751293c7de916dcf3 (diff)
Make route! macro auto-convert error types
`route!()` now calls `Groupped::to_chain()` on the error branch, removing the need for callers to pre-convert with `.to_chain()` or `.to_render()`.
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5384b45..b9b7bd7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -278,6 +278,16 @@ use mingling::{res::ResExitCode, res::ResREPL};
Removed the per-type inherent method generation from both `groupped.rs` and `pack.rs` in `mingling_macros`.
+4. **\[macros\]** Changed the `route!()` macro's error branch from `return e` to `return ::mingling::Groupped::to_chain(e)`, so that the error type no longer needs to be pre-converted to `ChainProcess` via `.to_chain()` or `.to_render()`. The macro now accepts any type implementing `Groupped` in the error position and automatically converts it.
+
+```rust
+// Before
+let value = route!(prev.pick_or_route((), Error::default().to_chain()).unpack());
+
+// After
+let value = route!(prev.pick_or_route((), Error::default()).unpack());
+```
+
### Release 0.1.9 (2026-05-29)
#### Fixes: