aboutsummaryrefslogtreecommitdiff
path: root/arg_picker/src/builtin/pick_bool.rs
diff options
context:
space:
mode:
Diffstat (limited to 'arg_picker/src/builtin/pick_bool.rs')
-rw-r--r--arg_picker/src/builtin/pick_bool.rs23
1 files changed, 0 insertions, 23 deletions
diff --git a/arg_picker/src/builtin/pick_bool.rs b/arg_picker/src/builtin/pick_bool.rs
deleted file mode 100644
index e508c7e..0000000
--- a/arg_picker/src/builtin/pick_bool.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Doc Not Optimize
-use crate::parselib::{FlagMatcher, Matcher};
-use crate::pickable_needed::*;
-
-impl<'a> Pickable<'a> for bool {
- 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() {
- // No matching flag found — signal NotFound so the fallback chain
- // (default → route) gets a chance to run.
- PickerArgResult::NotFound
- } else {
- PickerArgResult::Parsed(true)
- }
- }
-}