diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-01 22:42:41 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-01 22:42:41 +0800 |
| commit | 0f9ca0745e3e80c751404f45cb2b97d4d14c97d3 (patch) | |
| tree | 20d1c5c93b11397db27263820e3863bbb2ac11e5 /docs/pages/6-argument-parse-picker.md | |
| parent | e2050f6b6694733931edc6363194197c323b7d25 (diff) | |
refactor!: rename `extra_macros` feature to `extras`HEADmainfeat/new-pipeline-model
Update all references across docs, examples, and configuration files to
use the shorter `extras` feature name.
Diffstat (limited to 'docs/pages/6-argument-parse-picker.md')
| -rw-r--r-- | docs/pages/6-argument-parse-picker.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/pages/6-argument-parse-picker.md b/docs/pages/6-argument-parse-picker.md index 01f1c37..d7d38af 100644 --- a/docs/pages/6-argument-parse-picker.md +++ b/docs/pages/6-argument-parse-picker.md @@ -138,7 +138,7 @@ As the saying goes: "never trust your users." To handle missing required params, Here's a simple example: ```rust -// Features: ["parser", "extra_macros"] +// Features: ["parser", "extras"] @@@use mingling::macros::buffer; @@@use mingling::macros::route; @@@dispatcher!("greet", CMDGreet => EntryGreet); @@ -164,10 +164,10 @@ fn render_greet(result: ResultName) { With `pick_or_route`, the code becomes more involved: `.unpack()` no longer returns the value directly, but `Result<Value, Route>`. -However, **Mingling**'s `extra_macros` feature provides the `route!` macro for simplified expansion. It's not complex — it just reduces boilerplate: +However, **Mingling**'s `extras` feature provides the `route!` macro for simplified expansion. It's not complex — it just reduces boilerplate: ```rust -// Features: ["parser", "extra_macros"] +// Features: ["parser", "extras"] @@@ pack!(ErrorFail = ()); @@@ use mingling::macros::route; @@@ fn func() -> mingling::ChainProcess<ThisProgram> { @@ -181,7 +181,7 @@ let name = route!(pick_result); It expands to: ```rust -// Features: ["parser", "extra_macros"] +// Features: ["parser", "extras"] @@@ pack!(ErrorFail = ()); @@@ fn func() -> mingling::ChainProcess<ThisProgram> { @@@ let args: Vec<String> = vec![]; @@ -223,7 +223,7 @@ fn handle_greet_entry(prev: EntryGreet) -> Next { Similarly, you can use `after_or_route` to handle input format errors: ```rust -// Features: ["parser", "extra_macros"] +// Features: ["parser", "extras"] @@@use mingling::macros::buffer; @@@use mingling::macros::route; @@@dispatcher!("greet", CMDGreet => EntryGreet); |
