diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-16 04:08:09 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-16 05:25:21 +0800 |
| commit | ea6dda762aa147ebcbc29b269e65b78dd046f4dd (patch) | |
| tree | 9bf354ddc8d7b95162f3ae75e9800313eef1a26f /mingling_picker/src/builtin/pick_bool.rs | |
| parent | 0bded81c4e205e387998bf64087acfc39cf70e3e (diff) | |
feat(mingling_picker): replace bool Matcher with FlagMatcherfeat/picker2
Rename `bool_matcher` module to `flag_matcher` and introduce a dedicated
`FlagMatcher` struct, moving matching logic away from the `bool` type
itself
Diffstat (limited to 'mingling_picker/src/builtin/pick_bool.rs')
| -rw-r--r-- | mingling_picker/src/builtin/pick_bool.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mingling_picker/src/builtin/pick_bool.rs b/mingling_picker/src/builtin/pick_bool.rs index 65efe47..673f2a3 100644 --- a/mingling_picker/src/builtin/pick_bool.rs +++ b/mingling_picker/src/builtin/pick_bool.rs @@ -1,4 +1,5 @@ -use crate::{parselib::Matcher, pickable_needed::*}; +use crate::parselib::{FlagMatcher, Matcher}; +use crate::pickable_needed::*; impl<'a> Pickable<'a> for bool { fn get_attr(_: &'a PickerFlag<'a, Self>) -> PickerFlagAttr { @@ -6,7 +7,7 @@ impl<'a> Pickable<'a> for bool { } fn tag(ctx: TagPhaseContext) -> Vec<usize> { - <bool as Matcher>::match_all(ctx.into()) + FlagMatcher::match_all(ctx.into()) } fn pick(raw_strs: &[&str]) -> PickerArgResult<Self> { |
