aboutsummaryrefslogtreecommitdiff
path: root/mingling_picker/src/builtin/pick_flag.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mingling_picker/src/builtin/pick_flag.rs')
-rw-r--r--mingling_picker/src/builtin/pick_flag.rs21
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)
- }
- }
-}