mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
Mass replace ,); pattern (#3580)
This is an artifact left by rustfmt which is not dare to remove the comma being conservative.
This commit is contained in:
@@ -431,7 +431,7 @@ async fn submit_substrate_headers_batch(
|
||||
mut ids: Vec<RialtoHeaderId>,
|
||||
mut headers: HeadersBatch,
|
||||
) -> Option<RpcError> {
|
||||
debug_assert_eq!(ids.len(), headers.len(),);
|
||||
debug_assert_eq!(ids.len(), headers.len());
|
||||
|
||||
// if parent of first header is either incomplete, or rejected, we assume that contract
|
||||
// will reject this header as well
|
||||
|
||||
@@ -680,7 +680,7 @@ pub(crate) mod tests {
|
||||
&target,
|
||||
test_transaction_hash(0),
|
||||
))
|
||||
.is_err(),);
|
||||
.is_err());
|
||||
assert!(target.data.lock().submitted_proofs.is_empty());
|
||||
}
|
||||
|
||||
@@ -861,7 +861,7 @@ pub(crate) mod tests {
|
||||
failed: 1,
|
||||
}),
|
||||
);
|
||||
assert_eq!(target.data.lock().submitted_proofs, vec![],);
|
||||
assert_eq!(target.data.lock().submitted_proofs, vec![]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -456,25 +456,25 @@ fn prune_recent_finality_proofs_works() {
|
||||
// when there's proof for justified header in the vec
|
||||
let mut recent_finality_proofs = original_recent_finality_proofs.clone();
|
||||
prune_recent_finality_proofs::<TestFinalitySyncPipeline>(10, &mut recent_finality_proofs, 1024);
|
||||
assert_eq!(&original_recent_finality_proofs[1..], recent_finality_proofs,);
|
||||
assert_eq!(&original_recent_finality_proofs[1..], recent_finality_proofs);
|
||||
|
||||
// when there are no proof for justified header in the vec
|
||||
let mut recent_finality_proofs = original_recent_finality_proofs.clone();
|
||||
prune_recent_finality_proofs::<TestFinalitySyncPipeline>(11, &mut recent_finality_proofs, 1024);
|
||||
assert_eq!(&original_recent_finality_proofs[1..], recent_finality_proofs,);
|
||||
assert_eq!(&original_recent_finality_proofs[1..], recent_finality_proofs);
|
||||
|
||||
// when there are too many entries after initial prune && they also need to be pruned
|
||||
let mut recent_finality_proofs = original_recent_finality_proofs.clone();
|
||||
prune_recent_finality_proofs::<TestFinalitySyncPipeline>(10, &mut recent_finality_proofs, 2);
|
||||
assert_eq!(&original_recent_finality_proofs[3..], recent_finality_proofs,);
|
||||
assert_eq!(&original_recent_finality_proofs[3..], recent_finality_proofs);
|
||||
|
||||
// when last entry is pruned
|
||||
let mut recent_finality_proofs = original_recent_finality_proofs.clone();
|
||||
prune_recent_finality_proofs::<TestFinalitySyncPipeline>(19, &mut recent_finality_proofs, 2);
|
||||
assert_eq!(&original_recent_finality_proofs[5..], recent_finality_proofs,);
|
||||
assert_eq!(&original_recent_finality_proofs[5..], recent_finality_proofs);
|
||||
|
||||
// when post-last entry is pruned
|
||||
let mut recent_finality_proofs = original_recent_finality_proofs.clone();
|
||||
prune_recent_finality_proofs::<TestFinalitySyncPipeline>(20, &mut recent_finality_proofs, 2);
|
||||
assert_eq!(&original_recent_finality_proofs[5..], recent_finality_proofs,);
|
||||
assert_eq!(&original_recent_finality_proofs[5..], recent_finality_proofs);
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ fn source_reject_extra(method: &SourceMethod) {
|
||||
|
||||
fn target_accept_all_headers(method: &TargetMethod, data: &mut TargetData, requires_extra: bool) {
|
||||
if let TargetMethod::SubmitHeaders(ref submitted) = method {
|
||||
assert_eq!(submitted.iter().all(|header| header.extra().is_some()), requires_extra,);
|
||||
assert_eq!(submitted.iter().all(|header| header.extra().is_some()), requires_extra);
|
||||
|
||||
data.submit_headers_result = Some(SubmittedHeaders {
|
||||
submitted: submitted.iter().map(|header| header.id()).collect(),
|
||||
|
||||
@@ -872,7 +872,7 @@ pub(crate) mod tests {
|
||||
exit_receiver.into_future().map(|(_, _)| ()),
|
||||
);
|
||||
|
||||
assert_eq!(result.submitted_messages_proofs, vec![(1..=1, None)],);
|
||||
assert_eq!(result.submitted_messages_proofs, vec![(1..=1, None)]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -483,12 +483,12 @@ mod tests {
|
||||
);
|
||||
|
||||
strategy.remove_le_nonces_from_source_queue(5);
|
||||
assert_eq!(source_queue_nonces(&strategy.source_queue), vec![6, 7, 8, 9],);
|
||||
assert_eq!(source_queue_nonces(&strategy.source_queue), vec![6, 7, 8, 9]);
|
||||
|
||||
strategy.remove_le_nonces_from_source_queue(9);
|
||||
assert_eq!(source_queue_nonces(&strategy.source_queue), Vec::<MessageNonce>::new(),);
|
||||
assert_eq!(source_queue_nonces(&strategy.source_queue), Vec::<MessageNonce>::new());
|
||||
|
||||
strategy.remove_le_nonces_from_source_queue(100);
|
||||
assert_eq!(source_queue_nonces(&strategy.source_queue), Vec::<MessageNonce>::new(),);
|
||||
assert_eq!(source_queue_nonces(&strategy.source_queue), Vec::<MessageNonce>::new());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user