From 1771304c59f6bdf162ed655c8fbc69d478600bf5 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 14 Aug 2026 00:35:46 +0800 Subject: refactor: replace with_dispatchers with chained with_dispatcher calls --- examples/example-setup/src/main.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'examples/example-setup') diff --git a/examples/example-setup/src/main.rs b/examples/example-setup/src/main.rs index cd432dd..bf610ca 100644 --- a/examples/example-setup/src/main.rs +++ b/examples/example-setup/src/main.rs @@ -2,7 +2,7 @@ //! //! > This example demonstrates how to build a custom Setup for modular management of project components -use mingling::{macros::program_setup, prelude::*, Program}; +use mingling::{Program, macros::program_setup, prelude::*}; fn main() { let mut program = ThisProgram::new(); @@ -20,7 +20,11 @@ fn main() { // Package part of the program construction logic into this type for modular management #[program_setup] fn custom_setup(program: &mut Program) { - program.with_dispatchers((CMD1, CMD2, CMD3, CMD4, CMD5)); + program.with_dispatcher(CMD1); + program.with_dispatcher(CMD2); + program.with_dispatcher(CMD3); + program.with_dispatcher(CMD4); + program.with_dispatcher(CMD5); } // --------- IMPORTANT --------- -- cgit