Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new beta clippy warnings #1895

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gdk4/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -19,7 +20,7 @@

#[doc(alias = "GDK_MODIFIER_MASK")]
pub const MODIFIER_MASK: ModifierType = ModifierType::all();

Check warning on line 23 in gdk4/src/lib.rs

View workflow job for this annotation

GitHub Actions / build

redundant explicit link target
#[doc(alias = "GDK_ACTION_ALL")]
pub const ACTION_ALL: u32 = ffi::GDK_ACTION_ALL as u32;

Expand Down
1 change: 1 addition & 0 deletions gsk4/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions gtk4/src/accessible.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;

Expand Down Expand Up @@ -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::*;

Expand Down
6 changes: 3 additions & 3 deletions gtk4/src/bitset_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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)
}
}
Expand Down
1 change: 1 addition & 0 deletions gtk4/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gtk4/src/response_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self>;

#[inline]
Expand Down
Loading