From 02e07a18fcb3af9319c271f6e41d5b7785e2e436 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 10 Aug 2026 16:52:19 +0800 Subject: style: satisfy clippy pedantic and nursery lints --- arg_picker/src/value/vec_until.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'arg_picker/src/value/vec_until.rs') diff --git a/arg_picker/src/value/vec_until.rs b/arg_picker/src/value/vec_until.rs index 04d87ce..6394cbf 100644 --- a/arg_picker/src/value/vec_until.rs +++ b/arg_picker/src/value/vec_until.rs @@ -22,6 +22,7 @@ pub struct VecUntil { impl VecUntil { /// Consumes `self` and returns the underlying [`Vec`]. + #[must_use] pub fn into_inner(self) -> Vec { self.inner } @@ -29,7 +30,7 @@ impl VecUntil { impl From> for VecUntil { fn from(v: Vec) -> Self { - VecUntil { + Self { inner: v, _marker: PhantomData, } @@ -72,7 +73,7 @@ where PickerArgResult::Unparsed => {} } } - PickerArgResult::Parsed(VecUntil { + PickerArgResult::Parsed(Self { inner, _marker: PhantomData, }) @@ -97,7 +98,7 @@ where return positions; } - let start = if is_positional { 0 } else { 1 }; + let start = usize::from(!is_positional); if start >= positions.len() { return positions; } @@ -118,7 +119,7 @@ where fn pick(raw_strs: &[&str]) -> PickerArgResult { let strs = strip_flag(raw_strs); let owned: Vec = strs.iter().map(|&s| s.to_string()).collect(); - as MultiPickableWithBoundary>::pick_multi(owned) + ::pick_multi(owned) } } -- cgit