-
Notifications
You must be signed in to change notification settings - Fork 717
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
Fixing cargo clippy complaints #3448
Merged
Merged
Changes from 5 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
cde4709
Fixing cargo clippy complaints
beb250d
Merge branch 'main' into cargo_clippy_fix
franklee26 84db729
Removed derive Eq and disabled clippy warnings
2b49aa7
Merge branch 'main' of https://github.com/aws/s2n-tls into cargo_clip…
b9872e7
Merge branch 'cargo_clippy_fix' of https://github.com/aws/s2n-tls int…
cd21b2c
Fixing cargo clippy complaints
af3c471
Removed derive Eq and disabled clippy warnings
634e7b8
Moved clippy macro to lib.rs
96377a8
Merge branch 'cargo_clippy_fix' of https://github.com/aws/s2n-tls int…
33c6ffd
Formatting
79871a3
Fixing rebase
0ce13d5
Merge branch 'cargo_clippy_fix' of https://github.com/aws/s2n-tls int…
861b04d
Merge branch 'main' into cargo_clippy_fix
franklee26 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 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 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 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 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
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.
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.
why is this needed?
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.
Error:
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 hesitant to even fix this. This lint is unhelpful and doesn't make the code any more readable. In fact, I would argue it makes it less readable since it introduces an unnecessary variable in scope. From my reading, it looks like they're going to disable it by default in the next release: rust-lang/rust-clippy#8987
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 agree it doesn't seem helpful, but I don't think it's bad enough to bother suppressing. One unnecessary variable seems fine.
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 think an extra
let
declaration is ok, especially if it keeps clippy happy. When clippy disables this lint, we can remove this change.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.
Not without a TODO and an issue or something we won't :) But I also don't think it's important enough to spend time reverting.
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.
Yeah not a blocker. Especially since this code isn't even consumed outside of publishing. I'm just kind of annoyed with clippy pushing new warnings by default that are not universally applicable.