From c23c590330af83afb6e146bcd9b0a274b3689d22 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 17 Aug 2026 03:27:46 +0800 Subject: refactor!: remove Node type and simplify dispatcher macro syntax The `dispatcher!` macro no longer requires a `CMD*` dispatcher type argument; the dispatcher struct is now generated internally as `__Dispatcher{Pascal}`. The `Node` type, `node!` macro, and `Dispatcher::node()` / `clone_dispatcher()` methods are removed. --- docs/pages/14-testing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/pages/14-testing.md') diff --git a/docs/pages/14-testing.md b/docs/pages/14-testing.md index 86171bf..9f6b6ed 100644 --- a/docs/pages/14-testing.md +++ b/docs/pages/14-testing.md @@ -35,7 +35,7 @@ Testing a Chain is slightly more complex because its return value is `Next` (act ```rust @@@use mingling::{assert_member_id, assert_render_result, unpack_chain_process}; -@@@dispatcher!("hello", CMDHello => EntryHello); +@@@dispatcher!("hello", EntryHello); @@@pack!(ResultName = String); @@@pack!(ErrorNoName = ()); @@@#[chain] @@ -77,7 +77,7 @@ If `extras` is enabled, you can use `entry!` to quickly construct an Entry: @@@use mingling::{assert_member_id, unpack_chain_process}; @@@use mingling::macros::entry; -@@@dispatcher!("hello", CMDHello => EntryHello); +@@@dispatcher!("hello", EntryHello); @@@pack!(ResultName = String); @@@#[chain] @@@fn handle_hello(args: EntryHello) -> Next { @@ -102,7 +102,7 @@ If a Chain uses resources, you need to provide resource instances in the test: @@@use mingling::{assert_render_result, unpack_chain_process}; @@@#[derive(Default, Clone)] @@@struct ResPrefix(String); -@@@dispatcher!("hello", CMDHello => EntryHello); +@@@dispatcher!("hello", EntryHello); @@@pack!(ResultGreeting = String); @@@ #[chain] -- cgit