diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-19 00:21:23 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-19 00:21:23 +0800 |
| commit | 9b4cffd48482481691f782e74a4726294043bc57 (patch) | |
| tree | 246fbac3d482e49e960e75d16dc52d1ae710d6cc /mingling/src/setups/picker/consts.rs | |
| parent | 145e792e9bbda304312a9f5189bf033644e83263 (diff) | |
feat(picker): extract remains constant and consolidate imports
Move the inline `remains_arg` definition into a shared public constant
`REMAINS` and update all consumers to import it from the new location.
Diffstat (limited to 'mingling/src/setups/picker/consts.rs')
| -rw-r--r-- | mingling/src/setups/picker/consts.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/mingling/src/setups/picker/consts.rs b/mingling/src/setups/picker/consts.rs index e254b4f..5e93f3f 100644 --- a/mingling/src/setups/picker/consts.rs +++ b/mingling/src/setups/picker/consts.rs @@ -1,6 +1,19 @@ use std::marker::PhantomData; -use arg_picker::{PickerArg, value::Flag}; +use arg_picker::{PickerArg, PickerArgs, value::Flag}; + +/// Remaining positional arguments (anything not consumed as an option). +/// - `full`: `[]` (empty — not triggered by any `--` prefix). +/// - `short`: (none) +/// - `positional`: `false` (this is a meta‑argument that collects everything left). +/// This constant is used internally to access any leftover arguments after +/// all defined flags/options have been processed. +pub const REMAINS: PickerArg<PickerArgs> = PickerArg::<PickerArgs> { + full: &[], + short: None, + positional: false, + internal_type: PhantomData, +}; /// Help flag: display usage information. /// - `full`: `["help"]` |
