feat: solve remaining clippy warnings and add it to CI - #487
Merged
Conversation
Byron
enabled auto-merge (squash)
April 28, 2025 20:51
Byron
approved these changes
Apr 28, 2025
Byron
left a comment
Member
There was a problem hiding this comment.
Thanks a lot, much appreciated.
The #[allow(clippy::unnecessary_cast)] is a bit puzzling to me, but it's nothing to hold the PR up over.
Contributor
Author
|
If we try to cast a declaration to the same type as itself (A) that's an unnecessary cast, this lint tries to prevent stuff like this, but Clippy can't always see the full picture (in our case, different definitions behind feature flags, in a place we use type A and somewhere its type B, in this case Clippy sees only the first case, so it thinks we are making an unnecessary cast but we actually dont. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Other than quite a few usages of
#[allow(clippy::unnecessary_cast)]cause clippy can't fully see the full picture, things look fine to me.Many of my contributions contained clippy warning fixes and this PR solves all of the remaining ones and adds check for them to CI (as errors).