Skip to content

Commit c112acf

Browse files
misc: Move clippy lints guards to specific calls
Guard only auto or per function use case otherwise to avoid adding more code that would require fixes in the future
1 parent 0ca2f11 commit c112acf

File tree

7 files changed

+9
-3
lines changed

7 files changed

+9
-3
lines changed

gdk4-x11/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub use khronos_egl;
1818
mod rt;
1919

2020
#[allow(clippy::upper_case_acronyms)]
21+
#[allow(unused_imports)]
2122
mod auto;
2223

2324
pub mod builders;

gdk4/src/clipboard.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ impl Clipboard {
6464
}
6565
}
6666

67+
#[allow(clippy::type_complexity)]
6768
pub fn read_future(
6869
&self,
6970
mime_types: &[&str],

gdk4/src/drop.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ impl Drop {
6767
}
6868
}
6969

70+
#[allow(clippy::type_complexity)]
7071
pub fn read_future(
7172
&self,
7273
mime_types: &[&str],

gdk4/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Take a look at the license at the top of the repository in the LICENSE file.
22

33
#![cfg_attr(feature = "dox", feature(doc_cfg))]
4-
#![allow(clippy::type_complexity)]
54
#![doc = include_str!("../README.md")]
65

76
pub use cairo;
@@ -49,6 +48,7 @@ macro_rules! skip_assert_initialized {
4948
}
5049

5150
#[allow(clippy::derive_hash_xor_eq)]
51+
#[allow(clippy::type_complexity)]
5252
mod auto;
5353

5454
#[macro_use]

gdk4/src/subclass/content_provider.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ impl<T: ContentProviderImpl> ContentProviderImplExt for T {
156156
}
157157
}
158158

159+
#[allow(clippy::type_complexity)]
159160
fn parent_write_mime_type_async<
160161
Q: IsA<gio::Cancellable>,
161162
R: FnOnce(Result<(), glib::Error>) + 'static,

gtk4/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Take a look at the license at the top of the repository in the LICENSE file.
22

33
#![cfg_attr(feature = "dox", feature(doc_cfg))]
4-
#![allow(clippy::too_many_arguments)]
54
#![allow(deprecated)]
65
#![doc = include_str!("../README.md")]
76

@@ -89,8 +88,9 @@ static TEST_THREAD_WORKER: once_cell::sync::Lazy<glib::ThreadPool> =
8988
pool
9089
});
9190

92-
#[allow(clippy::type_complexity)]
9391
#[allow(clippy::derive_hash_xor_eq)]
92+
#[allow(clippy::too_many_arguments)]
93+
#[allow(clippy::type_complexity)]
9494
mod auto;
9595

9696
#[macro_use]

gtk4/src/subclass/cell_area.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ pub trait CellAreaImpl: CellAreaImplExt + ObjectImpl {
196196
self.parent_preferred_height_for_width(context, widget, width)
197197
}
198198

199+
#[allow(clippy::too_many_arguments)]
199200
fn snapshot<P: IsA<CellAreaContext>, W: IsA<Widget>>(
200201
&self,
201202
context: &P,
@@ -297,6 +298,7 @@ pub trait CellAreaImplExt: ObjectSubclass {
297298
width: i32,
298299
) -> (i32, i32);
299300

301+
#[allow(clippy::too_many_arguments)]
300302
fn parent_snapshot<P: IsA<CellAreaContext>, W: IsA<Widget>>(
301303
&self,
302304
context: &P,

0 commit comments

Comments
 (0)