-
-
Notifications
You must be signed in to change notification settings - Fork 4k
bevy_render: Apply #![deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)]
#17194
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
Merged
alice-i-cecile
merged 2 commits into
bevyengine:main
from
LikeLakers2:lint/deny_allow_and_without_reason/bevy_render
Jan 6, 2025
Merged
bevy_render: Apply #![deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)]
#17194
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#[allow(clippy::module_inception)] | ||
mod camera; | ||
mod camera_driver_node; | ||
mod clear_color; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,10 @@ pub trait RenderAsset: Send + Sync + 'static + Sized { | |
/// Size of the data the asset will upload to the gpu. Specifying a return value | ||
/// will allow the asset to be throttled via [`RenderAssetBytesPerFrame`]. | ||
#[inline] | ||
#[allow(unused_variables)] | ||
#[expect( | ||
unused_variables, | ||
reason = "The parameters here are intentionally unused by the default implementation; however, putting underscores here will result in the underscores being copied by rust-analyzer's tab completion." | ||
)] | ||
fn byte_len(source_asset: &Self::SourceAsset) -> Option<usize> { | ||
None | ||
} | ||
|
@@ -235,7 +238,10 @@ pub(crate) fn extract_render_asset<A: RenderAsset>( | |
let mut removed = <HashSet<_>>::default(); | ||
|
||
for event in events.read() { | ||
#[allow(clippy::match_same_arms)] | ||
#[expect( | ||
clippy::match_same_arms, | ||
reason = "LoadedWithDependencies is marked as a TODO, so it's likely this will no longer lint soon." | ||
)] | ||
Comment on lines
+241
to
+244
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not a fan of this reason... but I also didn't know what else to do, because merging the two arms would mean removing the |
||
match event { | ||
AssetEvent::Added { id } | AssetEvent::Modified { id } => { | ||
changed_assets.insert(*id); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -210,7 +210,6 @@ impl ShaderCache { | |
Ok(()) | ||
} | ||
|
||
#[allow(clippy::result_large_err)] | ||
fn get( | ||
&mut self, | ||
render_device: &RenderDevice, | ||
|
@@ -917,7 +916,10 @@ impl PipelineCache { | |
mut events: Extract<EventReader<AssetEvent<Shader>>>, | ||
) { | ||
for event in events.read() { | ||
#[allow(clippy::match_same_arms)] | ||
#[expect( | ||
clippy::match_same_arms, | ||
reason = "LoadedWithDependencies is marked as a TODO, so it's likely this will no longer lint soon." | ||
)] | ||
Comment on lines
+919
to
+922
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto. |
||
match event { | ||
// PERF: Instead of blocking waiting for the shader cache lock, try again next frame if the lock is currently held | ||
AssetEvent::Added { id } | AssetEvent::Modified { id } => { | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue of the module sharing a name with its parent is out-of-scope for this PR; but I have created an issue on the matter: #17196
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue number should go in the reason comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, let me do that.