From 39d66182f0290bacc10886c2659874bd9edc2d4b Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Tue, 19 May 2026 22:48:23 +0800 Subject: Add `empty_result!` macro and `REPL` resource, improve examples --- examples/example-exit-code/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/example-exit-code/src') diff --git a/examples/example-exit-code/src/main.rs b/examples/example-exit-code/src/main.rs index 028692e..39428e9 100644 --- a/examples/example-exit-code/src/main.rs +++ b/examples/example-exit-code/src/main.rs @@ -13,7 +13,7 @@ use mingling::prelude::*; use mingling::{ - res::{exit_code, update_exit_code}, + res::{ExitCode, exit_code}, setup::ExitCodeSetup, }; @@ -28,8 +28,8 @@ dispatcher!("error", ErrorCommand => ErrorEntry); pack!(ResultError = ()); #[chain] -fn handle_error_entry(_prev: ErrorEntry) -> Next { - update_exit_code::(1); +fn handle_error_entry(_prev: ErrorEntry, ec: &mut ExitCode) -> Next { + ec.exit_code = 1; return ResultError::default(); } -- cgit