aboutsummaryrefslogtreecommitdiff
path: root/examples/example-clap-binding
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-05-29 14:24:25 +0800
committer魏曹先生 <1992414357@qq.com>2026-05-29 14:24:25 +0800
commit23930c24b7eaf519d8ed36e4f433790eeb4d07fb (patch)
tree06540a1018c5b7070dc96c50141d49842c74778e /examples/example-clap-binding
parentdccc86be272091f4f14be52951f8c02996318cd0 (diff)
Update docs and examples for clap binding with optional error parameter
Diffstat (limited to 'examples/example-clap-binding')
-rw-r--r--examples/example-clap-binding/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/example-clap-binding/src/main.rs b/examples/example-clap-binding/src/main.rs
index aed437d..d3ad573 100644
--- a/examples/example-clap-binding/src/main.rs
+++ b/examples/example-clap-binding/src/main.rs
@@ -71,9 +71,9 @@ fn main() {
// vvvvvvv vvvvvvvvvvvv vvvvvvvv
#[derive(Default, clap::Parser, Groupped)]
#[dispatcher_clap(
- "greet", CMDGreet, // Bind EntryGreet to "greet" command
- help = true, // Generate clap help for EntryGreet
- error = ErrorGreetParsed // Generate and bind error type for parse failure
+ "greet", CMDGreet, // Bind EntryGreet to "greet" command
+ help = true, // Generate clap help for EntryGreet
+ error = ErrorGreetParsed, // Generate and bind error type for parse failure
// ^^^^^\__ Using `error` intercepts parse failure information into the specified type,
// which is then rendered by the renderer
)]