From 443ffe86485519a218997955335cde142733f88f Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 22 Jun 2026 23:59:31 +0800 Subject: 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()`. --- mingling/src/example_docs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mingling') diff --git a/mingling/src/example_docs.rs b/mingling/src/example_docs.rs index f77d9f6..caa12ae 100644 --- a/mingling/src/example_docs.rs +++ b/mingling/src/example_docs.rs @@ -79,7 +79,7 @@ /// .pick::(["--dir", "-D"]) /// .pick_or::("--size", 1024 * 1024_usize) /// // Finally parse the positional argument; if not found, route to `ErrorNoNameProvided` -/// .pick_or_route::((), ErrorNoNameProvided::default().to_chain()) +/// .pick_or_route::((), ErrorNoNameProvided::default()) /// .after(|str| str.trim().replace(' ', "")) /// .unpack() /// } @@ -670,7 +670,7 @@ pub mod example_completion {} /// #[chain] /// fn handle_connect(prev: EntryConnect) -> Next { /// let connect: Address = -/// route! { prev.pick_or_route((), ErrorParseAddressFailed::default().to_chain()).unpack() }; +/// route! { prev.pick_or_route((), ErrorParseAddressFailed::default()).unpack() }; /// connect.to_chain() /// } /// -- cgit