Skip to content

Commit

Permalink
bevy_window: Apply `#![deny(clippy::allow_attributes, clippy::allow_a…
Browse files Browse the repository at this point in the history
…ttributes_without_reason)]` (#17213)

# Objective
- #17111

## Solution
Set the `clippy::allow_attributes` and
`clippy::allow_attributes_without_reason` lints to `deny`, and bring
`bevy_window` in line with the new restrictions.

## Testing
`cargo clippy --tests` was run, and no errors were encountered.
  • Loading branch information
LikeLakers2 authored Jan 7, 2025
1 parent 3aa89e1 commit 8031d84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions crates/bevy_window/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![deny(
clippy::allow_attributes,
clippy::allow_attributes_without_reason,
reason = "See #17111; To be removed once all crates are in-line with these attributes"
)]
#![doc(
html_logo_url = "https://bevyengine.org/assets/icon.png",
html_favicon_url = "https://bevyengine.org/assets/icon.png"
Expand Down
5 changes: 4 additions & 1 deletion crates/bevy_window/src/raw_handle.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#![allow(unsafe_code)]
#![expect(
unsafe_code,
reason = "This module acts as a wrapper around the `raw_window_handle` crate, which exposes many unsafe interfaces; thus, we have to use unsafe code here."
)]

use alloc::sync::Arc;
use bevy_ecs::prelude::Component;
Expand Down

0 comments on commit 8031d84

Please sign in to comment.