aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-03 13:36:13 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-03 13:36:13 +0800
commit9c8f5c8d60f3066fec8a1573aa3f5673e0b2ecb8 (patch)
tree99a5de6f698310215163ffd488de2354c4b7fb3e /examples
parent82372181d3b819ce57b04207f42406c188e42ac9 (diff)
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.
Diffstat (limited to 'examples')
-rw-r--r--examples/example-error-handling/src/main.rs2
-rw-r--r--examples/example-repl-basic/src/main.rs2
-rw-r--r--examples/example-unit-test/src/main.rs2
-rw-r--r--examples/full-todolist/src/help.rs4
4 files changed, 5 insertions, 5 deletions
diff --git a/examples/example-error-handling/src/main.rs b/examples/example-error-handling/src/main.rs
index de9792d..0cd973a 100644
--- a/examples/example-error-handling/src/main.rs
+++ b/examples/example-error-handling/src/main.rs
@@ -94,7 +94,7 @@ fn render_error_name_too_long(len: ErrorNameTooLong) -> RenderResult {
/// Renders the error when the dispatcher (subcommand) is not found.
#[renderer]
-fn render_dispatcher_not_found(err: ErrorDispatcherNotFound) -> RenderResult {
+fn render_entry_fallback(err: EntryFallback) -> RenderResult {
let mut render_result = RenderResult::new();
writeln!(
render_result,
diff --git a/examples/example-repl-basic/src/main.rs b/examples/example-repl-basic/src/main.rs
index cfd00d1..361488d 100644
--- a/examples/example-repl-basic/src/main.rs
+++ b/examples/example-repl-basic/src/main.rs
@@ -178,7 +178,7 @@ fn render_error_directory_not_exist(err: ErrorDirectoryNotExist) -> RenderResult
/// Handle dispatcher not found event
/// Renders the error when a command is not found.
#[renderer]
-fn dispatcher_not_found(prev: ErrorDispatcherNotFound) -> RenderResult {
+fn dispatcher_not_found(prev: EntryFallback) -> RenderResult {
let mut render_result = RenderResult::new();
writeln!(render_result, "Command not found: \"{}\"", prev.join(", ")).ok();
render_result
diff --git a/examples/example-unit-test/src/main.rs b/examples/example-unit-test/src/main.rs
index e9169df..33ddde0 100644
--- a/examples/example-unit-test/src/main.rs
+++ b/examples/example-unit-test/src/main.rs
@@ -126,7 +126,7 @@ fn render_error_name_too_long(len: ErrorNameTooLong) -> RenderResult {
/// Renders the error when the dispatcher (subcommand) is not found.
#[renderer]
-fn render_dispatcher_not_found(err: ErrorDispatcherNotFound) -> RenderResult {
+fn render_entry_fallback(err: EntryFallback) -> RenderResult {
let mut render_result = RenderResult::new();
writeln!(
render_result,
diff --git a/examples/full-todolist/src/help.rs b/examples/full-todolist/src/help.rs
index 2f8228a..48b93f2 100644
--- a/examples/full-todolist/src/help.rs
+++ b/examples/full-todolist/src/help.rs
@@ -1,12 +1,12 @@
//! This module provides help information for the `todolist` command line program
-use crate::{EntryAdd, EntryClean, EntryComplete, EntryList, ErrorDispatcherNotFound};
+use crate::{EntryAdd, EntryClean, EntryComplete, EntryList, EntryFallback};
use mingling::{RenderResult, macros::help};
use std::io::Write;
/// Shows the global help message.
#[help]
-pub fn help_global(_p: ErrorDispatcherNotFound) -> RenderResult {
+pub fn help_global(_p: EntryFallback) -> RenderResult {
let mut render_result = RenderResult::new();
writeln!(
render_result,