aboutsummaryrefslogtreecommitdiff
path: root/arg_picker/src/pickable
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-10 16:52:19 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-10 16:52:19 +0800
commit02e07a18fcb3af9319c271f6e41d5b7785e2e436 (patch)
treeff76916c254e87a7aadc5cb4dfd2134eaf4f03fc /arg_picker/src/pickable
parent03b487f0f93ac32835149d4c1a0fb420341134f8 (diff)
style: satisfy clippy pedantic and nursery lints
Diffstat (limited to 'arg_picker/src/pickable')
-rw-r--r--arg_picker/src/pickable/multi_pickable.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/arg_picker/src/pickable/multi_pickable.rs b/arg_picker/src/pickable/multi_pickable.rs
index 404c23b..c5cd810 100644
--- a/arg_picker/src/pickable/multi_pickable.rs
+++ b/arg_picker/src/pickable/multi_pickable.rs
@@ -35,7 +35,7 @@ pub trait MultiPickableWithBoundary: Sized {
pub struct NoBoundary;
impl BoundaryCheck for NoBoundary {
- #[inline(always)]
+ #[inline]
fn check_boundary(_raw: &str) -> bool {
false
}
@@ -46,7 +46,7 @@ impl<T: SinglePickable> MultiPickableWithBoundary for Vec<T> {
type Checker = NoBoundary;
fn pick_multi(raw: Vec<String>) -> PickerArgResult<Self> {
- let mut result = Vec::with_capacity(raw.len());
+ let mut result = Self::with_capacity(raw.len());
for s in &raw {
match T::pick_single(Some(s)) {
PickerArgResult::Parsed(v) => result.push(v),
@@ -87,6 +87,6 @@ where
fn pick(raw_strs: &[&str]) -> PickerArgResult<Self> {
let strs = strip_flag(raw_strs);
let owned: Vec<String> = strs.iter().map(|&s| s.to_string()).collect();
- <Vec<T> as MultiPickableWithBoundary>::pick_multi(owned)
+ <Self as MultiPickableWithBoundary>::pick_multi(owned)
}
}