pub enum ConstantParameterReason {
IdenticalArgument,
NeverPassed,
UnusedDefault,
}Expand description
Why the rule reports a parameter.
Variants§
IdenticalArgument
Each call passes the same value for the parameter: the same literal, or the same immutable binding.
NeverPassed
The parameter is optional or has a default, and each call omits it. For an option key: no call sets the key.
UnusedDefault
The parameter has a default, and each call passes a value whose type
excludes undefined, so the default never applies. Only type-aware
mode reports this reason.
Implementations§
Trait Implementations§
Source§impl Clone for ConstantParameterReason
impl Clone for ConstantParameterReason
impl Copy for ConstantParameterReason
Source§impl Debug for ConstantParameterReason
impl Debug for ConstantParameterReason
Source§impl<'de> Deserialize<'de> for ConstantParameterReason
impl<'de> Deserialize<'de> for ConstantParameterReason
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ConstantParameterReason
Source§impl Hash for ConstantParameterReason
impl Hash for ConstantParameterReason
Source§impl PartialEq for ConstantParameterReason
impl PartialEq for ConstantParameterReason
Source§impl Serialize for ConstantParameterReason
impl Serialize for ConstantParameterReason
impl StructuralPartialEq for ConstantParameterReason
Auto Trait Implementations§
impl Forget for ConstantParameterReason
impl Freeze for ConstantParameterReason
impl Move for ConstantParameterReason
impl RefUnwindSafe for ConstantParameterReason
impl Send for ConstantParameterReason
impl Sync for ConstantParameterReason
impl Unpin for ConstantParameterReason
impl UnsafeUnpin for ConstantParameterReason
impl UnwindSafe for ConstantParameterReason
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.