diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-22 23:59:31 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-22 23:59:31 +0800 |
| commit | 443ffe86485519a218997955335cde142733f88f (patch) | |
| tree | ef331749338c8653ac8a241bfd1cf83cd0683468 /mingling/src/example_docs.rs | |
| parent | 31b5abfc96013309530025b751293c7de916dcf3 (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 'mingling/src/example_docs.rs')
| -rw-r--r-- | mingling/src/example_docs.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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::<bool>(["--dir", "-D"]) /// .pick_or::<usize>("--size", 1024 * 1024_usize) /// // Finally parse the positional argument; if not found, route to `ErrorNoNameProvided` -/// .pick_or_route::<String, _>((), ErrorNoNameProvided::default().to_chain()) +/// .pick_or_route::<String, _>((), 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() /// } /// |
