aboutsummaryrefslogtreecommitdiff
path: root/examples/example-exit-code
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example-exit-code')
-rw-r--r--examples/example-exit-code/src/main.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/example-exit-code/src/main.rs b/examples/example-exit-code/src/main.rs
index f138fb3..f62ad22 100644
--- a/examples/example-exit-code/src/main.rs
+++ b/examples/example-exit-code/src/main.rs
@@ -13,9 +13,8 @@
use mingling::{
macros::{chain, dispatcher, gen_program, pack, r_println, renderer},
- res::ExitCode,
+ res::update_exit_code,
setup::ExitCodeSetup,
- this,
};
fn main() {
@@ -30,7 +29,7 @@ pack!(ResultError = ());
#[chain]
fn handle_error_entry(_prev: ErrorEntry) -> NextProcess {
- this::<ThisProgram>().modify_res(|r: &mut ExitCode| r.exit_code = 1);
+ update_exit_code::<ThisProgram>(1);
return ResultError::default();
}