aboutsummaryrefslogtreecommitdiff
path: root/examples/example-exit-code/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example-exit-code/src/main.rs')
-rw-r--r--examples/example-exit-code/src/main.rs6
1 files changed, 3 insertions, 3 deletions
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::<ThisProgram>(1);
+fn handle_error_entry(_prev: ErrorEntry, ec: &mut ExitCode) -> Next {
+ ec.exit_code = 1;
return ResultError::default();
}