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/flag.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'arg_picker/src/value/flag.rs') diff --git a/arg_picker/src/value/flag.rs b/arg_picker/src/value/flag.rs index c0673bd..6449d65 100644 --- a/arg_picker/src/value/flag.rs +++ b/arg_picker/src/value/flag.rs @@ -80,9 +80,9 @@ impl Flag { /// [`Active`]: Flag::Active /// [`Inactive`]: Flag::Inactive #[must_use] - #[inline(always)] + #[inline] pub fn bool(&self) -> bool { - *self == Flag::Active + *self == Self::Active } } @@ -101,7 +101,7 @@ impl PartialEq for bool { impl From for Flag { fn from(value: bool) -> Self { - if value { Flag::Active } else { Flag::Inactive } + if value { Self::Active } else { Self::Inactive } } } @@ -127,19 +127,19 @@ impl Deref for Flag { fn deref(&self) -> &bool { match self { - Flag::Active => &true, - Flag::Inactive => &false, + Self::Active => &true, + Self::Inactive => &false, } } } impl Not for Flag { - type Output = Flag; + type Output = Self; - fn not(self) -> Flag { + fn not(self) -> Self { match self { - Flag::Active => Flag::Inactive, - Flag::Inactive => Flag::Active, + Self::Active => Self::Inactive, + Self::Inactive => Self::Active, } } } -- cgit