From 5e59dd5e58a14659cd557dc43d6f5176a13fee9e Mon Sep 17 00:00:00 2001 From: Weicao-CatilGrass <1992414357@qq.com> Date: Wed, 13 May 2026 08:39:08 +0800 Subject: Add test tool for examples and update exit code demo --- mingling/src/example_docs.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mingling') diff --git a/mingling/src/example_docs.rs b/mingling/src/example_docs.rs index 1669344..ba61f92 100644 --- a/mingling/src/example_docs.rs +++ b/mingling/src/example_docs.rs @@ -371,7 +371,7 @@ pub mod example_dispatch_tree {} /// ```ignore /// use mingling::{ /// macros::{chain, dispatcher, gen_program, pack, r_println, renderer}, -/// res::update_exit_code, +/// res::{exit_code, update_exit_code}, /// setup::ExitCodeSetup, /// }; /// @@ -379,7 +379,7 @@ pub mod example_dispatch_tree {} /// let mut program = ThisProgram::new(); /// program.with_dispatcher(ErrorCommand); /// program.with_setup(ExitCodeSetup::::default()); -/// program.exec(); +/// program.exec_and_exit(); /// } /// /// dispatcher!("error", ErrorCommand => ErrorEntry); @@ -393,7 +393,8 @@ pub mod example_dispatch_tree {} /// /// #[renderer] /// fn render_error(_prev: ResultError) { -/// r_println!("Error!"); +/// let exit_code = exit_code::(); +/// r_println!("Exit with exit code: {}", exit_code); /// } /// /// gen_program!(); -- cgit