From bba132f8de5ba16ef58da70612b782dae339c221 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Thu, 31 Oct 2024 14:39:24 +0100 Subject: [PATCH] Fix new beta clippy warnings --- gtk4/src/accessible.rs | 4 ++-- gtk4/src/bitset_iter.rs | 6 +++--- gtk4/src/response_type.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gtk4/src/accessible.rs b/gtk4/src/accessible.rs index c73c6726f743..d10eb0c8381f 100644 --- a/gtk4/src/accessible.rs +++ b/gtk4/src/accessible.rs @@ -119,7 +119,7 @@ pub enum Property<'p> { ValueText(&'p str), } -impl<'p> Property<'p> { +impl Property<'_> { fn to_property_value(&self) -> (AccessibleProperty, Value) { use Property::*; @@ -173,7 +173,7 @@ pub enum Relation<'r> { SetSize(i32), } -impl<'r> Relation<'r> { +impl Relation<'_> { fn to_relation_value(&self) -> (AccessibleRelation, Value) { use Relation::*; diff --git a/gtk4/src/bitset_iter.rs b/gtk4/src/bitset_iter.rs index ac4fcb52f74c..344e7dd57b8c 100644 --- a/gtk4/src/bitset_iter.rs +++ b/gtk4/src/bitset_iter.rs @@ -108,7 +108,7 @@ impl<'a> BitsetIter<'a> { } } -impl<'a> Iterator for BitsetIter<'a> { +impl Iterator for BitsetIter<'_> { type Item = u32; #[doc(alias = "gtk_bitset_iter_next")] @@ -129,14 +129,14 @@ impl<'a> Iterator for BitsetIter<'a> { } } -impl<'a> std::iter::FusedIterator for BitsetIter<'a> {} +impl std::iter::FusedIterator for BitsetIter<'_> {} #[doc(hidden)] impl<'a> ToGlibPtr<'a, *const ffi::GtkBitsetIter> for BitsetIter<'a> { type Storage = &'a Self; #[inline] - fn to_glib_none(&'a self) -> Stash<*const ffi::GtkBitsetIter, Self> { + fn to_glib_none(&'a self) -> Stash<'a, *const ffi::GtkBitsetIter, Self> { Stash(&self.0 as *const ffi::GtkBitsetIter, self) } } diff --git a/gtk4/src/response_type.rs b/gtk4/src/response_type.rs index 3df4e9da2458..a862bb058b59 100644 --- a/gtk4/src/response_type.rs +++ b/gtk4/src/response_type.rs @@ -118,7 +118,7 @@ impl ValueType for ResponseType { type Type = Self; } -unsafe impl<'a> FromValue<'a> for ResponseType { +unsafe impl FromValue<'_> for ResponseType { type Checker = glib::value::GenericValueTypeChecker; #[inline]