-
-
Notifications
You must be signed in to change notification settings - Fork 4k
bevy_asset: Apply #![deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)]
#17113
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
bevy_asset: Apply #![deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)]
#17113
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -342,18 +342,14 @@ mod tests { | |
|
||
use super::*; | ||
|
||
// The compiler notices these fields are never read and raises a dead_code lint which kill CI. | ||
#[allow(dead_code)] | ||
#[derive(Asset, TypePath, Debug)] | ||
struct A(usize); | ||
struct A; | ||
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. In case you're wondering: I checked and double-checked to make sure that removing these If they affect tests, I didn't see it during my testing. 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 don't think the tests are meant to test specifically unit struct assets. Unit struct assets don't sound very useful anyway. 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. Sure, but... The tests compile and finish successfully either way. Really, the If we start needing a value, they can be added back. 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. It's true that as far as I can see there seems to be no behavior in the tests hinging on the structs having any fields. However, idk if they're relevant for 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. @IQuick143 I don't believe they're relevant for I mean, it appears that changing one to include 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. In that case, I think this fix is good :) |
||
|
||
#[allow(dead_code)] | ||
#[derive(Asset, TypePath, Debug)] | ||
struct B(usize); | ||
struct B; | ||
|
||
#[allow(dead_code)] | ||
#[derive(Asset, TypePath, Debug)] | ||
struct C(usize); | ||
struct C; | ||
|
||
struct Loader<A: Asset, const N: usize, const E: usize> { | ||
sender: Sender<()>, | ||
|
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.
I have no idea why this only lints on the enum test case, despite the struct test cases also being unused.