mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 16:21:02 +00:00
Remove extra commas made redundent after rustfmt (#9404)
* Remove extra commas made redundent after rustfmt
This commit is contained in:
@@ -780,13 +780,13 @@ mod tests {
|
||||
authorities.add_pending_change(change(1), &is_descendent_of).unwrap();
|
||||
authorities.add_pending_change(change(2), &is_descendent_of).unwrap();
|
||||
|
||||
assert_eq!(authorities.current_limit(0), Some(1),);
|
||||
assert_eq!(authorities.current_limit(0), Some(1));
|
||||
|
||||
assert_eq!(authorities.current_limit(1), Some(1),);
|
||||
assert_eq!(authorities.current_limit(1), Some(1));
|
||||
|
||||
assert_eq!(authorities.current_limit(2), Some(2),);
|
||||
assert_eq!(authorities.current_limit(2), Some(2));
|
||||
|
||||
assert_eq!(authorities.current_limit(3), None,);
|
||||
assert_eq!(authorities.current_limit(3), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -910,7 +910,7 @@ mod tests {
|
||||
.add_pending_change(change_b.clone(), &static_is_descendent_of(true))
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(authorities.pending_changes().collect::<Vec<_>>(), vec![&change_a, &change_b],);
|
||||
assert_eq!(authorities.pending_changes().collect::<Vec<_>>(), vec![&change_a, &change_b]);
|
||||
|
||||
// finalizing "hash_c" won't enact the change signaled at "hash_a" but it will prune out "hash_b"
|
||||
let status = authorities
|
||||
@@ -929,7 +929,7 @@ mod tests {
|
||||
|
||||
assert!(status.changed);
|
||||
assert_eq!(status.new_set_block, None);
|
||||
assert_eq!(authorities.pending_changes().collect::<Vec<_>>(), vec![&change_a],);
|
||||
assert_eq!(authorities.pending_changes().collect::<Vec<_>>(), vec![&change_a]);
|
||||
assert_eq!(authorities.authority_set_changes, AuthoritySetChanges::empty());
|
||||
|
||||
// finalizing "hash_d" will enact the change signaled at "hash_a"
|
||||
@@ -1444,7 +1444,7 @@ mod tests {
|
||||
);
|
||||
|
||||
// there's no longer any pending change at `best_b` fork
|
||||
assert_eq!(authorities.next_change(&"best_b", &is_descendent_of).unwrap(), None,);
|
||||
assert_eq!(authorities.next_change(&"best_b", &is_descendent_of).unwrap(), None);
|
||||
|
||||
// we a forced change at A10 (#8)
|
||||
let change_a10 = PendingChange {
|
||||
@@ -1666,7 +1666,7 @@ mod tests {
|
||||
authority_set_changes.append(2, 81);
|
||||
|
||||
// we are missing the data for the first set, therefore we should return `None`
|
||||
assert_eq!(None, authority_set_changes.iter_from(40).map(|it| it.collect::<Vec<_>>()),);
|
||||
assert_eq!(None, authority_set_changes.iter_from(40).map(|it| it.collect::<Vec<_>>()));
|
||||
|
||||
// after adding the data for the first set the same query should work
|
||||
let mut authority_set_changes = AuthoritySetChanges::empty();
|
||||
@@ -1685,8 +1685,8 @@ mod tests {
|
||||
authority_set_changes.iter_from(41).map(|it| it.cloned().collect::<Vec<_>>()),
|
||||
);
|
||||
|
||||
assert_eq!(0, authority_set_changes.iter_from(121).unwrap().count(),);
|
||||
assert_eq!(0, authority_set_changes.iter_from(121).unwrap().count());
|
||||
|
||||
assert_eq!(0, authority_set_changes.iter_from(200).unwrap().count(),);
|
||||
assert_eq!(0, authority_set_changes.iter_from(200).unwrap().count());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -536,7 +536,7 @@ mod test {
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
assert_eq!(load_decode::<_, u32>(&client, VERSION_KEY).unwrap(), None,);
|
||||
assert_eq!(load_decode::<_, u32>(&client, VERSION_KEY).unwrap(), None);
|
||||
|
||||
// should perform the migration
|
||||
load_persistent::<substrate_test_runtime_client::runtime::Block, _, _>(
|
||||
@@ -547,7 +547,7 @@ mod test {
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(load_decode::<_, u32>(&client, VERSION_KEY).unwrap(), Some(3),);
|
||||
assert_eq!(load_decode::<_, u32>(&client, VERSION_KEY).unwrap(), Some(3));
|
||||
|
||||
let PersistentData { authority_set, set_state, .. } =
|
||||
load_persistent::<substrate_test_runtime_client::runtime::Block, _, _>(
|
||||
@@ -629,7 +629,7 @@ mod test {
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
assert_eq!(load_decode::<_, u32>(&client, VERSION_KEY).unwrap(), Some(1),);
|
||||
assert_eq!(load_decode::<_, u32>(&client, VERSION_KEY).unwrap(), Some(1));
|
||||
|
||||
// should perform the migration
|
||||
load_persistent::<substrate_test_runtime_client::runtime::Block, _, _>(
|
||||
@@ -640,7 +640,7 @@ mod test {
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(load_decode::<_, u32>(&client, VERSION_KEY).unwrap(), Some(3),);
|
||||
assert_eq!(load_decode::<_, u32>(&client, VERSION_KEY).unwrap(), Some(3));
|
||||
|
||||
let PersistentData { authority_set, set_state, .. } =
|
||||
load_persistent::<substrate_test_runtime_client::runtime::Block, _, _>(
|
||||
@@ -719,7 +719,7 @@ mod test {
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
assert_eq!(load_decode::<_, u32>(&client, VERSION_KEY).unwrap(), Some(2),);
|
||||
assert_eq!(load_decode::<_, u32>(&client, VERSION_KEY).unwrap(), Some(2));
|
||||
|
||||
// should perform the migration
|
||||
load_persistent::<substrate_test_runtime_client::runtime::Block, _, _>(
|
||||
@@ -730,7 +730,7 @@ mod test {
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(load_decode::<_, u32>(&client, VERSION_KEY).unwrap(), Some(3),);
|
||||
assert_eq!(load_decode::<_, u32>(&client, VERSION_KEY).unwrap(), Some(3));
|
||||
|
||||
let PersistentData { authority_set, .. } = load_persistent::<
|
||||
substrate_test_runtime_client::runtime::Block,
|
||||
|
||||
@@ -2258,7 +2258,7 @@ mod tests {
|
||||
// we accept messages from rounds 9, 10 and 11
|
||||
// therefore neither of those should be considered expired
|
||||
for round in &[9, 10, 11] {
|
||||
assert!(!is_expired(crate::communication::round_topic::<Block>(*round, 1), &[],))
|
||||
assert!(!is_expired(crate::communication::round_topic::<Block>(*round, 1), &[]))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2533,10 +2533,10 @@ mod tests {
|
||||
);
|
||||
|
||||
// it should be expired if it is for a lower block
|
||||
assert!(message_expired(crate::communication::global_topic::<Block>(1), &commit(1, 1, 1),));
|
||||
assert!(message_expired(crate::communication::global_topic::<Block>(1), &commit(1, 1, 1)));
|
||||
|
||||
// or the same block height but from the previous round
|
||||
assert!(message_expired(crate::communication::global_topic::<Block>(1), &commit(0, 1, 2),));
|
||||
assert!(message_expired(crate::communication::global_topic::<Block>(1), &commit(0, 1, 2)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -512,7 +512,7 @@ fn peer_with_higher_view_leads_to_catch_up_request() {
|
||||
tester
|
||||
.filter_network_events(move |event| match event {
|
||||
Event::WriteNotification(peer, message) => {
|
||||
assert_eq!(peer, id,);
|
||||
assert_eq!(peer, id);
|
||||
|
||||
assert_eq!(
|
||||
message,
|
||||
|
||||
@@ -1376,7 +1376,7 @@ where
|
||||
set_ref.len(),
|
||||
);
|
||||
} else {
|
||||
afg_log!(initial_sync, "👴 Applying GRANDPA set change to new set {:?}", set_ref,);
|
||||
afg_log!(initial_sync, "👴 Applying GRANDPA set change to new set {:?}", set_ref);
|
||||
}
|
||||
|
||||
telemetry!(
|
||||
|
||||
@@ -512,7 +512,7 @@ pub(crate) mod tests {
|
||||
let mut authority_set_changes = AuthoritySetChanges::empty();
|
||||
authority_set_changes.append(0, 5);
|
||||
|
||||
assert!(matches!(prove_finality(&*backend, authority_set_changes, 6), Ok(None),));
|
||||
assert!(matches!(prove_finality(&*backend, authority_set_changes, 6), Ok(None)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -1631,7 +1631,7 @@ fn imports_justification_for_regular_blocks_on_import() {
|
||||
);
|
||||
|
||||
// the justification should be imported and available from the client
|
||||
assert!(client.justifications(&BlockId::Hash(block_hash)).unwrap().is_some(),);
|
||||
assert!(client.justifications(&BlockId::Hash(block_hash)).unwrap().is_some());
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -759,7 +759,7 @@ mod tests {
|
||||
chain_state.import_header(h3);
|
||||
});
|
||||
|
||||
assert_eq!(unapply_commit(res), unapply_commit(unknown_commit()),);
|
||||
assert_eq!(unapply_commit(res), unapply_commit(unknown_commit()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -787,7 +787,7 @@ mod tests {
|
||||
chain_state.import_header(h3);
|
||||
});
|
||||
|
||||
assert_eq!(unapply_commit(res), unapply_commit(known_commit()),);
|
||||
assert_eq!(unapply_commit(res), unapply_commit(known_commit()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -835,7 +835,7 @@ mod tests {
|
||||
chain_state.import_header(h3);
|
||||
});
|
||||
|
||||
assert_eq!(unapply_catch_up(res), unapply_catch_up(unknown_catch_up()),);
|
||||
assert_eq!(unapply_catch_up(res), unapply_catch_up(unknown_catch_up()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -883,7 +883,7 @@ mod tests {
|
||||
chain_state.import_header(h3);
|
||||
});
|
||||
|
||||
assert_eq!(unapply_catch_up(res), unapply_catch_up(unknown_catch_up()),);
|
||||
assert_eq!(unapply_catch_up(res), unapply_catch_up(unknown_catch_up()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user