From 6980fbf2f9fb4c599d8dc6ff549a8b3288eb24e9 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 17 Aug 2026 02:29:30 +0800 Subject: refactor!: remove dynamic dispatcher registration API Dispatchers are now always registered at compile time, removing the `with_dispatcher` / `with_dispatchers` methods and the `PathfinderConfig` API. The `dispatch_tree` feature now only controls the matching strategy (trie vs linear list). --- examples/example-command-macro/src/main.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'examples/example-command-macro/src/main.rs') diff --git a/examples/example-command-macro/src/main.rs b/examples/example-command-macro/src/main.rs index 2bf932a..d080043 100644 --- a/examples/example-command-macro/src/main.rs +++ b/examples/example-command-macro/src/main.rs @@ -19,14 +19,7 @@ use mingling::{macros::buffer, picker::IntoPicker, prelude::*}; fn main() { - let mut program = ThisProgram::new(); - - // Import the dispatchers generated by the `#[command]` macro - program.with_dispatcher(CMDHelloWorld); - program.with_dispatcher(CMDGreetSomeone); - program.with_dispatcher(CMDGoodBye); - - program.exec_and_exit(); + ThisProgram::new().exec_and_exit(); } pack!(ResultGreeting = String); -- cgit