aboutsummaryrefslogtreecommitdiff
path: root/mingling_cli/src/main.rs
diff options
context:
space:
mode:
authorWeicao-CatilGrass <1992414357@qq.com>2026-04-14 03:03:21 +0800
committerWeicao-CatilGrass <1992414357@qq.com>2026-04-14 03:03:21 +0800
commit33469c75614c444f512fd51dbc78a31a9a4bec82 (patch)
treed8ba8fbc76a8cbb2bdee60ae4569b85dbd1e3402 /mingling_cli/src/main.rs
parent56c24db7bcd92e2eb9a779bd141fcc73a7c433c0 (diff)
Rename add_dispatcher module to dispatcher_mgr and add remove command
Diffstat (limited to 'mingling_cli/src/main.rs')
-rw-r--r--mingling_cli/src/main.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/mingling_cli/src/main.rs b/mingling_cli/src/main.rs
index c4dfe21..a0066f4 100644
--- a/mingling_cli/src/main.rs
+++ b/mingling_cli/src/main.rs
@@ -1,16 +1,16 @@
use mingling::{macros::gen_program, setup::BasicProgramSetup};
-mod add_dispatcher;
-pub use crate::add_dispatcher::*;
+mod dispatcher_mgr;
+pub use crate::dispatcher_mgr::*;
#[tokio::main]
async fn main() {
- let mut program = MinglingCLI::new();
+ let mut program = ThisProgram::new();
program.with_setup(BasicProgramSetup);
- program.with_dispatcher(AddDispatcherCommand);
+ program.with_dispatcher(CompletionDispatcher);
+ program.with_dispatchers((AddDispatcherCommand, RemoveDispatcherCommand));
- let render_result = program.exec_without_render().await.unwrap();
- println!("{}", render_result);
+ program.exec().await;
}
-gen_program!(MinglingCLI);
+gen_program!();