From 9c8f5c8d60f3066fec8a1573aa3f5673e0b2ecb8 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 3 Aug 2026 13:36:13 +0800 Subject: chore!: rename ErrorDispatcherNotFound to EntryFallback Rename the internal fallback type and its associated `ProgramCollect` plumbing from `ErrorDispatcherNotFound`/`build_dispatcher_not_found` to `EntryFallback`/`build_entry_fallback`, along with the generated enum variant and pack type. Update all documentation, examples, and tests accordingly. --- docs/_zh_CN/pages/10-help.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/_zh_CN/pages/10-help.md') diff --git a/docs/_zh_CN/pages/10-help.md b/docs/_zh_CN/pages/10-help.md index 1c4e410..a399ae3 100644 --- a/docs/_zh_CN/pages/10-help.md +++ b/docs/_zh_CN/pages/10-help.md @@ -27,14 +27,14 @@ fn help_greet(_entry: EntryGreet) { ## 全局帮助 -你也可以为 `ErrorDispatcherNotFound` 写帮助,作为"根帮助": +你也可以为 `EntryFallback` 写帮助,作为"根帮助": ```rust @@@use mingling::macros::help; @@@use mingling::macros::buffer; // 用户直接输入 --help 时触发 #[help(buffer)] -fn help_root(entry: ErrorDispatcherNotFound) { +fn help_root(entry: EntryFallback) { r_println!("Usage: my-cli "); r_println!("Commands:"); r_println!(" greet Say hello"); @@ -42,7 +42,7 @@ fn help_root(entry: ErrorDispatcherNotFound) { ``` > [!TIP] -> `ErrorDispatcherNotFound` 是 `gen_program!()` 自动生成的类型,代表"没有匹配到任何命令"的情况。为它写 `#[help]` 就是给程序的根命令加帮助。 +> `EntryFallback` 是 `gen_program!()` 自动生成的类型,代表"没有匹配到任何命令"的情况。为它写 `#[help]` 就是给程序的根命令加帮助。 ## 需要 Setup 配合 -- cgit