Skip to content

Commit

Permalink
Fix / silence various new Rust 1.83 clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sdroege authored and bilelmoussaoui committed Nov 29, 2024
1 parent e5b674e commit 478854c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gdk-pixbuf/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.

#![allow(clippy::manual_c_str_literals)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc = include_str!("../README.md")]

Expand All @@ -8,7 +9,6 @@ pub use gio;
pub use glib;

#[allow(clippy::too_many_arguments)]
#[allow(clippy::manual_c_str_literals)]
mod auto;

pub mod subclass;
Expand Down
2 changes: 1 addition & 1 deletion glib/src/gobject/binding_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct BindingGroupBuilder<'a> {
transform_from: TransformFn,
}

impl<'a> fmt::Debug for BindingGroupBuilder<'a> {
impl fmt::Debug for BindingGroupBuilder<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("BindingGroupBuilder")
.field("group", &self.group)
Expand Down
1 change: 1 addition & 0 deletions glib/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(clippy::missing_safety_doc)]
#![allow(clippy::manual_c_str_literals)]
#![allow(renamed_and_removed_lints)]
// Override docs references to point to locally generated docs
// rustdoc-stripper-ignore-next
Expand Down
2 changes: 1 addition & 1 deletion glib/tests/unicollate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn init() {
// Make sure that all tests below are running with the system
// locale and not the "C" locale.
ONCE.call_once(|| unsafe {
libc::setlocale(libc::LC_ALL, b"\0".as_ptr() as *const _);
libc::setlocale(libc::LC_ALL, c"".as_ptr() as *const _);
});
}

Expand Down

0 comments on commit 478854c

Please sign in to comment.