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. --- mingling_core/src/comp.rs | 2 +- mingling_core/src/program/collection.rs | 4 ++-- mingling_core/src/program/collection/mock.rs | 4 ++-- mingling_core/src/program/exec.rs | 4 ++-- mingling_core/src/program/hook.rs | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'mingling_core') diff --git a/mingling_core/src/comp.rs b/mingling_core/src/comp.rs index d8dcfbd..952fb87 100644 --- a/mingling_core/src/comp.rs +++ b/mingling_core/src/comp.rs @@ -139,7 +139,7 @@ impl CompletionHelper { trace!("entry type: {}", any.member_id); let dispatcher_not_found = - >::member_id(); + >::member_id(); if dispatcher_not_found == any.member_id { debug!("dispatcher_not_found matched"); diff --git a/mingling_core/src/program/collection.rs b/mingling_core/src/program/collection.rs index fa062cf..1b4d7dd 100644 --- a/mingling_core/src/program/collection.rs +++ b/mingling_core/src/program/collection.rs @@ -22,7 +22,7 @@ pub trait ProgramCollect { /// Enum type representing internal IDs for the program type Enum; /// Error type when a dispatcher is not found for the given member - type ErrorDispatcherNotFound: Grouped; + type EntryFallback: Grouped; /// Error type when a renderer is not found for the given member type ErrorRendererNotFound: Grouped; @@ -55,7 +55,7 @@ pub trait ProgramCollect { fn build_renderer_not_found(member_id: Self::Enum) -> AnyOutput; /// Build an [`AnyOutput`](./struct.AnyOutput.html) to indicate that a dispatcher was not found - fn build_dispatcher_not_found(args: Vec) -> AnyOutput; + fn build_entry_fallback(args: Vec) -> AnyOutput; /// Build an [`AnyOutput`](./struct.AnyOutput.html) to indicate that the chain returned an empty result fn build_empty_result() -> AnyOutput; diff --git a/mingling_core/src/program/collection/mock.rs b/mingling_core/src/program/collection/mock.rs index dbe4789..cd2abf5 100644 --- a/mingling_core/src/program/collection/mock.rs +++ b/mingling_core/src/program/collection/mock.rs @@ -34,7 +34,7 @@ unsafe impl Grouped for MockProgramCollect { impl ProgramCollect for MockProgramCollect { type Enum = MockProgramCollect; - type ErrorDispatcherNotFound = MockProgramCollect; + type EntryFallback = MockProgramCollect; type ErrorRendererNotFound = MockProgramCollect; type ResultEmpty = MockProgramCollect; @@ -54,7 +54,7 @@ impl ProgramCollect for MockProgramCollect { unreachable!() } - fn build_dispatcher_not_found(_args: Vec) -> AnyOutput { + fn build_entry_fallback(_args: Vec) -> AnyOutput { unreachable!() } diff --git a/mingling_core/src/program/exec.rs b/mingling_core/src/program/exec.rs index f0322a5..d9b4dd8 100644 --- a/mingling_core/src/program/exec.rs +++ b/mingling_core/src/program/exec.rs @@ -45,7 +45,7 @@ where } // Current - let mut current = C::build_dispatcher_not_found(vec![]); + let mut current = C::build_entry_fallback(vec![]); // Run hooks control!( @@ -193,7 +193,7 @@ where } Err(ProgramInternalExecuteError::DispatcherNotFound) => { // No matching Dispatcher is found - C::build_dispatcher_not_found(args.to_vec()) + C::build_entry_fallback(args.to_vec()) } Err(e) => return Err(e), }; diff --git a/mingling_core/src/program/hook.rs b/mingling_core/src/program/hook.rs index 7d94a21..50c53d7 100644 --- a/mingling_core/src/program/hook.rs +++ b/mingling_core/src/program/hook.rs @@ -713,7 +713,7 @@ mod tests { impl ProgramCollect for MockHookEnum { type Enum = MockHookEnum; - type ErrorDispatcherNotFound = MockHookEnum; + type EntryFallback = MockHookEnum; type ErrorRendererNotFound = MockHookEnum; type ResultEmpty = MockHookEnum; @@ -721,7 +721,7 @@ mod tests { unreachable!() } - fn build_dispatcher_not_found(_args: Vec) -> crate::AnyOutput { + fn build_entry_fallback(_args: Vec) -> crate::AnyOutput { unreachable!() } -- cgit