aboutsummaryrefslogtreecommitdiff
path: root/examples/example-picker
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-04-18 01:19:07 +0800
committer魏曹先生 <1992414357@qq.com>2026-04-18 01:19:07 +0800
commit873e6a180e4132f99034329e2ea7e1f386fb16d0 (patch)
tree235594809a4488104e11179c184a7f231e02d53b /examples/example-picker
parent29aac51928573b7fc58fc7fe151acaaa187889c5 (diff)
Simplify examples by removing AnyOutput usage
Diffstat (limited to 'examples/example-picker')
-rw-r--r--examples/example-picker/src/main.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/example-picker/src/main.rs b/examples/example-picker/src/main.rs
index 3abb5db..7619b98 100644
--- a/examples/example-picker/src/main.rs
+++ b/examples/example-picker/src/main.rs
@@ -18,7 +18,6 @@
//! ```
use mingling::{
- AnyOutput,
macros::{chain, dispatcher, gen_program, pack, r_println, renderer},
marker::NextProcess,
parser::Picker,
@@ -45,12 +44,12 @@ async fn parse(prev: PickEntry) -> NextProcess {
.pick_or("--age", 20)
.after(|n: i32| n.clamp(0, 100))
// Then sequentially extract the remaining arguments
- .pick_or_route((), AnyOutput::new(NoNameProvided::default()))
+ .pick_or_route((), NoNameProvided::default().to_render())
.unpack();
match picked {
Ok(value) => ParsedPickInput::new(value).to_render(),
- Err(e) => e.route_renderer(),
+ Err(e) => e,
}
}