-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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_audio: Apply #![deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)]
#17119
base: main
Are you sure you want to change the base?
bevy_audio: Apply #![deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)]
#17119
Conversation
…out_reason)]` to bevy_audio
7d7dc73
to
90e53b4
Compare
crates/bevy_audio/src/audio.rs
Outdated
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'm gonna be honest: I have NO idea what's happening with rustc's linter in this file. It's marking a deprecated item's definition as a use of a deprecated item, and it's marking the impls for that deprecated item as a use of that deprecated item.
But I tried my best to silence the lints, while simultaneously changing all allow
s to expect
s, and giving them all reason = "..."
.
So I hope the comment atop AudioSourceBundle
and the module-wide expect
are okay. They were the best I could do without straight-up removing the struct - which, frankly, I'm not sure if that's a good idea in the middle of 0.15
.
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've figured it out - it's the #[derive(Bundle)]
placed atop AudioSourceBundle
. I've updated the comment atop AudioSourceBundle
to reflect these findings.
I consider this to be a rustc issue, and hence don't want to try to change the Bundle derive to include #[allow(deprecated)]
. However, I have written a bug report for this:
I disagree with your interpretation of rustc's deprecation behavior. An impl is a usage. I think this should be blocked on #16338, which would clean-up this changeset. |
@BenjaminBrienen Ok. Just notify me when that PR is merged and I'll update this PR. |
#[deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)]
#![deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)]
This PR is blocked on #16338 per Benjamin's request. Once that is merged, I will fix any conflicts and mark it as ready to merge. |
Objective
clippy::allow_attributes
andclippy::allow_attributes_without_reason
lints #17111Solution
Set the
clippy::allow_attributes
andclippy::allow_attributes_without_reason
lints todeny
, and bringbevy_audio
in line with the new restrictions.No code changes have been made - except if a lint that was previously
allow(...)
'd could be removed via small code changes. For example,unused_variables
can be handled by adding a_
to the beginning of a field's name.Testing
cargo clippy
andcargo test --package bevy_audio
were run, and no errors were encountered.