Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Address new rust 1.69 clippy lints
Browse files Browse the repository at this point in the history
* `derive_hash_xor_eq` has been renamed to `derived_hash_with_manual_eq`
* The new `extra-unused-type-parameters` complains about a bunch of
  callsites where extraneous type parameters are used for consistency
  with other functions.
  • Loading branch information
Mira Ressel committed May 4, 2023
1 parent e325832 commit e5c83ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ rustflags = [
"-Aclippy::needless_option_as_deref", # false positives
"-Aclippy::derivable_impls", # false positives
"-Aclippy::stable_sort_primitive", # prefer stable sort
"-Aclippy::extra-unused-type-parameters" # stylistic
]
2 changes: 1 addition & 1 deletion client/network/sync/src/block_request_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct SeenRequestsKey<B: BlockT> {
support_multiple_justifications: bool,
}

#[allow(clippy::derive_hash_xor_eq)]
#[allow(clippy::derived_hash_with_manual_eq)]
impl<B: BlockT> Hash for SeenRequestsKey<B> {
fn hash<H: Hasher>(&self, state: &mut H) {
self.peer.hash(state);
Expand Down
2 changes: 1 addition & 1 deletion client/network/sync/src/state_request_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ struct SeenRequestsKey<B: BlockT> {
start: Vec<Vec<u8>>,
}

#[allow(clippy::derive_hash_xor_eq)]
#[allow(clippy::derived_hash_with_manual_eq)]
impl<B: BlockT> Hash for SeenRequestsKey<B> {
fn hash<H: Hasher>(&self, state: &mut H) {
self.peer.hash(state);
Expand Down

0 comments on commit e5c83ee

Please sign in to comment.