aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-18 02:30:09 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-18 02:30:09 +0800
commitcd9cad77542e1909f9600f8a2e2754cc4cc4507a (patch)
treed77eb9838a92b4b71de6252e6d892056123cfc1a /docs
parente70ffc81399f0f90f71fd269f4ba2ee90ca20c4a (diff)
chore!: simplify ExitCodeSetup to non-generic unit struct
Diffstat (limited to 'docs')
-rw-r--r--docs/_zh_CN/pages/12-exit-code.md4
-rw-r--r--docs/pages/12-exit-code.md4
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/_zh_CN/pages/12-exit-code.md b/docs/_zh_CN/pages/12-exit-code.md
index 9270b84..1f9e05c 100644
--- a/docs/_zh_CN/pages/12-exit-code.md
+++ b/docs/_zh_CN/pages/12-exit-code.md
@@ -12,7 +12,7 @@
@@@use mingling::setup::ExitCodeSetup;
fn main() {
let mut program = ThisProgram::new();
- program.with_setup(ExitCodeSetup::default());
+ program.with_setup(ExitCodeSetup);
@@@ program.exec_and_exit();
}
```
@@ -55,7 +55,7 @@ fn handle_check(_args: EntryCheck, ec: &mut ResExitCode) {
@@@use mingling::setup::ExitCodeSetup;
fn main() {
let mut program = ThisProgram::new();
- program.with_setup(ExitCodeSetup::default());
+ program.with_setup(ExitCodeSetup);
// 获取退出码自行处理
let exit_code = program.exec();
diff --git a/docs/pages/12-exit-code.md b/docs/pages/12-exit-code.md
index 8fa320c..e9ad9de 100644
--- a/docs/pages/12-exit-code.md
+++ b/docs/pages/12-exit-code.md
@@ -12,7 +12,7 @@ Providing the shell with a correct exit code when a program terminates is a basi
@@@use mingling::setup::ExitCodeSetup;
fn main() {
let mut program = ThisProgram::new();
- program.with_setup(ExitCodeSetup::default());
+ program.with_setup(ExitCodeSetup);
@@@ program.exec_and_exit();
}
```
@@ -55,7 +55,7 @@ fn handle_check(_args: EntryCheck, ec: &mut ResExitCode) {
@@@use mingling::setup::ExitCodeSetup;
fn main() {
let mut program = ThisProgram::new();
- program.with_setup(ExitCodeSetup::default());
+ program.with_setup(ExitCodeSetup);
// Get exit code and handle it yourself
let exit_code = program.exec();