mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Fix clippy warnings (#7625)
* Fix clippy check Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Autofix clippy Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix trivial Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * suppress warnings Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Quiet clippy 😌 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
a0f83eb992
commit
d501d92176
@@ -87,7 +87,7 @@ fn test_harness<T: Future<Output = VirtualOverseer>>(
|
||||
None,
|
||||
);
|
||||
|
||||
let target_hash = case_vars.target_block.clone();
|
||||
let target_hash = case_vars.target_block;
|
||||
let selection_process = async move {
|
||||
let best = select_relay_chain
|
||||
.finality_target_with_longest_chain(target_hash, None)
|
||||
@@ -106,8 +106,7 @@ fn test_harness<T: Future<Output = VirtualOverseer>>(
|
||||
let _overseer = test_fut.await;
|
||||
},
|
||||
selection_process,
|
||||
))
|
||||
.1;
|
||||
));
|
||||
}
|
||||
|
||||
async fn overseer_recv(overseer: &mut VirtualOverseer) -> AllMessages {
|
||||
@@ -241,7 +240,7 @@ impl ChainBuilder {
|
||||
builder
|
||||
}
|
||||
|
||||
pub fn add_block<'a>(&'a mut self, hash: Hash, parent_hash: Hash, number: u32) -> &'a mut Self {
|
||||
pub fn add_block(&mut self, hash: Hash, parent_hash: Hash, number: u32) -> &mut Self {
|
||||
assert!(number != 0, "cannot add duplicate genesis block");
|
||||
assert!(hash != Self::GENESIS_HASH, "cannot add block with genesis hash");
|
||||
assert!(
|
||||
@@ -252,12 +251,7 @@ impl ChainBuilder {
|
||||
self.add_block_inner(hash, parent_hash, number)
|
||||
}
|
||||
|
||||
fn add_block_inner<'a>(
|
||||
&'a mut self,
|
||||
hash: Hash,
|
||||
parent_hash: Hash,
|
||||
number: u32,
|
||||
) -> &'a mut Self {
|
||||
fn add_block_inner(&mut self, hash: Hash, parent_hash: Hash, number: u32) -> &mut Self {
|
||||
let header = ChainBuilder::make_header(parent_hash, number);
|
||||
assert!(
|
||||
self.0.blocks_by_hash.insert(hash, header).is_none(),
|
||||
@@ -360,7 +354,7 @@ async fn test_skeleton(
|
||||
))
|
||||
=> {
|
||||
assert_eq!(target_block_hash, target_hash, "TestIntegrity: target hashes always match. qed");
|
||||
tx.send(best_chain_containing_block.clone()).unwrap();
|
||||
tx.send(best_chain_containing_block).unwrap();
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user