mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 22:05:42 +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
@@ -53,14 +53,14 @@ async fn execute_good_block_on_parent() {
|
||||
|
||||
#[tokio::test]
|
||||
async fn execute_good_chain_on_parent() {
|
||||
let mut number = 0;
|
||||
let mut parent_hash = [0; 32];
|
||||
let mut last_state = 0;
|
||||
|
||||
let host = TestHost::new();
|
||||
|
||||
for add in 0..10 {
|
||||
let parent_head = HeadData { number, parent_hash, post_state: hash_state(last_state) };
|
||||
for (number, add) in (0..10).enumerate() {
|
||||
let parent_head =
|
||||
HeadData { number: number as u64, parent_hash, post_state: hash_state(last_state) };
|
||||
|
||||
let block_data = BlockData { state: last_state, add };
|
||||
|
||||
@@ -80,11 +80,10 @@ async fn execute_good_chain_on_parent() {
|
||||
|
||||
let new_head = HeadData::decode(&mut &ret.head_data.0[..]).unwrap();
|
||||
|
||||
assert_eq!(new_head.number, number + 1);
|
||||
assert_eq!(new_head.number, number as u64 + 1);
|
||||
assert_eq!(new_head.parent_hash, parent_head.hash());
|
||||
assert_eq!(new_head.post_state, hash_state(last_state + add));
|
||||
|
||||
number += 1;
|
||||
parent_hash = new_head.hash();
|
||||
last_state += add;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user