clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2025-01-15 13:52:21 +01:00
parent 9c7a42379a
commit ca64bc9fdf
6 changed files with 14 additions and 14 deletions

View File

@ -183,7 +183,7 @@ pub struct Iter<'a> {
_phantom: PhantomData<&'a Array>, _phantom: PhantomData<&'a Array>,
} }
impl<'a> Iterator for Iter<'a> { impl Iterator for Iter<'_> {
type Item = Value; type Item = Value;
fn next(&mut self) -> Option<Self::Item> { fn next(&mut self) -> Option<Self::Item> {

View File

@ -49,7 +49,7 @@ where
Ok(out) Ok(out)
} }
impl<'deserializer> Deserializer<'deserializer> { impl Deserializer<'_> {
pub fn from_value(input: Value) -> Self { pub fn from_value(input: Value) -> Self {
Deserializer { Deserializer {
input, input,
@ -188,7 +188,7 @@ unsafe fn str_set_wrong_lifetime<'a>(s: &'_ str) -> &'a str {
unsafe { std::str::from_utf8_unchecked(std::slice::from_raw_parts(s.as_ptr(), s.len())) } unsafe { std::str::from_utf8_unchecked(std::slice::from_raw_parts(s.as_ptr(), s.len())) }
} }
impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> { impl<'de> de::Deserializer<'de> for &mut Deserializer<'de> {
type Error = Error; type Error = Error;
fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error> fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error>
@ -559,7 +559,7 @@ struct EnumDeserializer<'a> {
value: Option<Value>, value: Option<Value>,
} }
impl<'a, 'de> de::EnumAccess<'de> for EnumDeserializer<'a> { impl<'de> de::EnumAccess<'de> for EnumDeserializer<'_> {
type Error = Error; type Error = Error;
type Variant = VariantDeserializer; type Variant = VariantDeserializer;
@ -578,7 +578,7 @@ struct EnumDeserializerByteVariant<'a> {
value: Option<Value>, value: Option<Value>,
} }
impl<'a, 'de> de::EnumAccess<'de> for EnumDeserializerByteVariant<'a> { impl<'de> de::EnumAccess<'de> for EnumDeserializerByteVariant<'_> {
type Error = Error; type Error = Error;
type Variant = VariantDeserializer; type Variant = VariantDeserializer;
@ -671,7 +671,7 @@ impl<'a> HashAccess<'a> {
} }
} }
impl<'de, 'a> MapAccess<'de> for HashAccess<'a> { impl<'de> MapAccess<'de> for HashAccess<'_> {
type Error = Error; type Error = Error;
fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Error> fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Error>
@ -732,7 +732,7 @@ impl<'a> ArrayAccess<'a> {
} }
} }
impl<'de, 'a> SeqAccess<'de> for ArrayAccess<'a> { impl<'de> SeqAccess<'de> for ArrayAccess<'_> {
type Error = Error; type Error = Error;
fn next_element_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Error> fn next_element_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Error>
@ -750,7 +750,7 @@ struct RawDeserializer<'a> {
value: Option<&'a Value>, value: Option<&'a Value>,
} }
impl<'de, 'a> MapAccess<'de> for RawDeserializer<'a> { impl<'de> MapAccess<'de> for RawDeserializer<'_> {
type Error = Error; type Error = Error;
fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Error> fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Error>

View File

@ -1,4 +1,4 @@
/// Convenience macros. //! Convenience macros.
/// Create a standard destructor for a boxed type. /// Create a standard destructor for a boxed type.
/// ///

View File

@ -239,10 +239,10 @@ pub struct MagicSpec<'o, 'v, T> {
} }
/// It doesn't actually contain a `T` /// It doesn't actually contain a `T`
unsafe impl<'o, 'v, T> Sync for MagicSpec<'o, 'v, T> {} unsafe impl<T> Sync for MagicSpec<'_, '_, T> {}
/// It doesn't actually contain a `T` /// It doesn't actually contain a `T`
unsafe impl<'o, 'v, T> Send for MagicSpec<'o, 'v, T> {} unsafe impl<T> Send for MagicSpec<'_, '_, T> {}
impl<T> MagicSpec<'static, 'static, T> { impl<T> MagicSpec<'static, 'static, T> {
/// Create a new static magic specification from a tag. /// Create a new static magic specification from a tag.

View File

@ -93,8 +93,8 @@ impl Scalar {
if s.as_bytes().iter().any(|&b| b >= 0x80) { if s.as_bytes().iter().any(|&b| b >= 0x80) {
unsafe { unsafe {
Self::from_raw_move(ffi::RSPL_newSVpvn_utf8( Self::from_raw_move(ffi::RSPL_newSVpvn_utf8(
s.as_bytes().as_ptr() as *const libc::c_char, s.as_ptr() as *const libc::c_char,
s.as_bytes().len() as libc::size_t, s.len() as libc::size_t,
)) ))
} }
} else { } else {

View File

@ -614,7 +614,7 @@ impl<'de> Deserialize<'de> for Value {
} }
} }
impl<'de> Visitor<'de> for KeyClassifier { impl Visitor<'_> for KeyClassifier {
type Value = KeyClass; type Value = KeyClass;
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {