[NFC] Fix lints added in new Rust version - #177
Closed
arthurp wants to merge 5 commits into
Closed
Conversation
arthurp
force-pushed
the
arthurp/fix-lints
branch
2 times, most recently
from
March 12, 2026 22:17
fdec2b5 to
8c9d370
Compare
arthurp
force-pushed
the
arthurp/fix-lints
branch
from
March 12, 2026 22:41
8c9d370 to
5ce266e
Compare
arthurp
marked this pull request as ready for review
March 13, 2026 01:15
Contributor
Author
|
@aanyas72 I've added you as a reviewer since you may learn from just reading rust code, and all I need from reviewing this is to check that the change does not affect behavior. |
aneeshdurg
approved these changes
Apr 22, 2026
| let key = Key::random(); | ||
| let mac = Aead::new().encrypt(&node.0, &key, &Iv::new_zeroed(), &[], cipher)?; | ||
|
|
||
| node_entries.push(MhtNodeEntry { pos, key, mac }); |
Contributor
There was a problem hiding this comment.
can we just inline "start_pos + i" here and avoid the zip? It's a bit harder to understand for no real gain imo
| }, | ||
| ), | ||
| ObservationQuery::new_filter(|m: &Message| { | ||
| if m.id.is_multiple_of(2) { |
Contributor
There was a problem hiding this comment.
We could just do m.id.is_multiple_of(2).then_some(m.id)
Contributor
Author
|
The upstream merge (#236) obviates this. |
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.
This is a follow-up on #176 which reenables a bunch of lints and fixes code that violate them.
This leaves collapsible_match disabled because it recommends changes that change the behavior of the program (by causing match fall-through that didn't happen before).
Whether or not we want to merge this is up for debate because merging this will cause us to fairly arbitrarily diverge from upstream. Pros: The lints are generally good and will improve the code. Cons: This will create arbitrary conflicts if we try to merge from upstream, however we are not allowed to do blind merges, so that may not matter.
Notes for reviewers: