Skip to content

Commit 9b2282b

Browse files
LikeLakers2mrchantey
authored andcommitted
bevy_dylib: Apply #![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)] (bevyengine#17332)
# Objective - bevyengine#17111 ## Solution Set the `clippy::allow_attributes` and `clippy::allow_attributes_without_reason` lints to `warn`, and bring `bevy_dylib` in line with the new restrictions. ## Testing `cargo clippy --tests --all-features --package bevy_dylib` was run, and no warnings were encountered. I would've skipped over this crate if there weren't the two lint attributes in it - might as well handle it now, y'know?
1 parent c228c7e commit 9b2282b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

crates/bevy_dylib/src/lib.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2+
#![warn(
3+
clippy::allow_attributes,
4+
clippy::allow_attributes_without_reason,
5+
reason = "See #17111; To be removed once all crates are in-line with these attributes"
6+
)]
27
#![doc(
38
html_logo_url = "https://bevyengine.org/assets/icon.png",
49
html_favicon_url = "https://bevyengine.org/assets/icon.png"
@@ -54,6 +59,9 @@
5459
//! ```
5560
5661
// Force linking of the main bevy crate
57-
#[allow(unused_imports)]
58-
#[allow(clippy::single_component_path_imports)]
62+
#[expect(
63+
unused_imports,
64+
clippy::single_component_path_imports,
65+
reason = "This links the main bevy crate when using dynamic linking, and as such cannot be removed or changed without affecting dynamic linking."
66+
)]
5967
use bevy_internal;

0 commit comments

Comments
 (0)