mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 16:11:05 +00:00
add clippy to CI (#9694)
* Focus on correctness lints. This relies on a compiler patch that landed 8th July 2021. If people are using an earlier version of the compiler everything will still work unless they try and run clippy. Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
This commit is contained in:
@@ -304,7 +304,7 @@ pub fn create_wasm_runtime_with_code(
|
||||
//
|
||||
// We drop the cache_path here to silence warnings that cache_path is not used if
|
||||
// compiling without the `wasmtime` flag.
|
||||
drop(cache_path);
|
||||
let _ = cache_path;
|
||||
|
||||
sc_executor_wasmi::create_runtime(
|
||||
blob,
|
||||
|
||||
@@ -85,13 +85,14 @@ struct SeenRequestsKey<B: BlockT> {
|
||||
support_multiple_justifications: bool,
|
||||
}
|
||||
|
||||
#[allow(clippy::derive_hash_xor_eq)]
|
||||
impl<B: BlockT> Hash for SeenRequestsKey<B> {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
self.peer.hash(state);
|
||||
self.max_blocks.hash(state);
|
||||
self.direction.hash(state);
|
||||
self.attributes.hash(state);
|
||||
|
||||
self.support_multiple_justifications.hash(state);
|
||||
match self.from {
|
||||
BlockId::Hash(h) => h.hash(state),
|
||||
BlockId::Number(n) => n.hash(state),
|
||||
|
||||
@@ -78,6 +78,7 @@ struct SeenRequestsKey<B: BlockT> {
|
||||
start: Vec<u8>,
|
||||
}
|
||||
|
||||
#[allow(clippy::derive_hash_xor_eq)]
|
||||
impl<B: BlockT> Hash for SeenRequestsKey<B> {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
self.peer.hash(state);
|
||||
|
||||
Reference in New Issue
Block a user