From 4084147211b9c1b3e7716cba2a1252775d504154 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Thu, 31 Oct 2024 14:39:11 +0100 Subject: [PATCH 1/2] Ignore manual_c_str_literals clippy warning --- gdk4/src/lib.rs | 1 + gsk4/src/lib.rs | 1 + gtk4/src/lib.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/gdk4/src/lib.rs b/gdk4/src/lib.rs index 4624cf65419e..d3759f408030 100644 --- a/gdk4/src/lib.rs +++ b/gdk4/src/lib.rs @@ -2,6 +2,7 @@ #![cfg_attr(docsrs, feature(doc_cfg))] #![allow(deprecated)] +#![allow(clippy::manual_c_str_literals)] #![doc = include_str!("../README.md")] pub use cairo; diff --git a/gsk4/src/lib.rs b/gsk4/src/lib.rs index 296e9aa97286..01f5e06081d0 100644 --- a/gsk4/src/lib.rs +++ b/gsk4/src/lib.rs @@ -2,6 +2,7 @@ #![cfg_attr(docsrs, feature(doc_cfg))] #![allow(deprecated)] +#![allow(clippy::manual_c_str_literals)] #![doc = include_str!("../README.md")] pub use cairo; diff --git a/gtk4/src/lib.rs b/gtk4/src/lib.rs index 60536d7a5432..8949cb0b35ce 100644 --- a/gtk4/src/lib.rs +++ b/gtk4/src/lib.rs @@ -2,6 +2,7 @@ #![cfg_attr(docsrs, feature(doc_cfg))] #![allow(deprecated)] +#![allow(clippy::manual_c_str_literals)] #![doc = include_str!("../README.md")] // Re-export gtk dependencies From 394a119c0fa3cc138fe56be91a4a6a8db7ceef89 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Thu, 31 Oct 2024 14:39:24 +0100 Subject: [PATCH 2/2] 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]