aboutsummaryrefslogtreecommitdiff
path: root/CHANGELOG.md
diff options
context:
space:
mode:
authorWeicao-CatilGrass <1992414357@qq.com>2026-06-01 19:16:28 +0800
committerWeicao-CatilGrass <1992414357@qq.com>2026-06-01 19:16:28 +0800
commitbfe10f7805b3edf4f69fd764c324dd6ddcb5609f (patch)
tree2acd30f79e606f6018a3f5293fd20bd1decb1ccd /CHANGELOG.md
parent7c86f55f5a3f497d566b64b32babbdc9c971c9f3 (diff)
Refactor flag argument macros for better performance
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e7b9257..a888cc2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,7 +10,7 @@
#### Optimizations:
-None
+1. **\[core:flag\]** Refactored the `special_argument!` and `special_arguments!` macros to replace index‑based `while` loops with iterator `position` and `drain`, improving both performance and readability.
#### Features:
@@ -22,6 +22,7 @@ This macro wraps `::mingling::test::unpack_chain_process_result` to downcast a `
let result = some_chain_function(args).into();
let value: MyType = unpack_chain_process!(result, MyType);
```
+
2. **\[core\]** Refactored the built-in flag system in `BasicProgramSetup` into individual, reusable setup structs (`HelpFlagSetup`, `QuietFlagSetup`, `ConfirmFlagSetup`). These setups are now separate implementations of `ProgramSetup`, each with customizable flag aliases and `Default` implementations. `BasicProgramSetup` now composes them via `with_setup` instead of defining flags inline.
```rust