diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-17 11:08:07 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-17 11:11:28 +0800 |
| commit | 79ec6878877f0fd9246d67d3cd4f8cc2d1200150 (patch) | |
| tree | e3cd8cfc7ef5cd2a6a7ceb93d9a4b1764fa21b61 /mingling_picker/src/builtin/pick_flag.rs | |
| parent | e6136f22cff446b16dbebf3b26a6fdea6dbc0e83 (diff) | |
refactor: rename `mingling_picker` to `arg_picker`
Diffstat (limited to 'mingling_picker/src/builtin/pick_flag.rs')
| -rw-r--r-- | mingling_picker/src/builtin/pick_flag.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/mingling_picker/src/builtin/pick_flag.rs b/mingling_picker/src/builtin/pick_flag.rs deleted file mode 100644 index b642a9a..0000000 --- a/mingling_picker/src/builtin/pick_flag.rs +++ /dev/null @@ -1,21 +0,0 @@ -use crate::parselib::{FlagMatcher, Matcher}; -use crate::pickable_needed::*; -use crate::value::Flag; - -impl<'a> Pickable<'a> for Flag { - fn get_attr(_: &'a PickerArg<'a, Self>) -> PickerArgAttr { - PickerArgAttr::Flag - } - - fn tag(ctx: TagPhaseContext) -> Vec<usize> { - FlagMatcher::match_all(ctx.into()) - } - - fn pick(raw_strs: &[&str]) -> PickerArgResult<Self> { - if raw_strs.is_empty() { - PickerArgResult::Parsed(Flag::Inactive) - } else { - PickerArgResult::Parsed(Flag::Active) - } - } -} |
