mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 06:08:00 +00:00
Remove extra commas made redundent after rustfmt (#9404)
* Remove extra commas made redundent after rustfmt
This commit is contained in:
@@ -169,21 +169,21 @@ mod test {
|
||||
let header6 = create_header(3); // @ slot 4
|
||||
|
||||
// It's ok to sign same headers.
|
||||
assert!(check_equivocation(&client, 2.into(), 2.into(), &header1, &public,)
|
||||
assert!(check_equivocation(&client, 2.into(), 2.into(), &header1, &public)
|
||||
.unwrap()
|
||||
.is_none(),);
|
||||
|
||||
assert!(check_equivocation(&client, 3.into(), 2.into(), &header1, &public,)
|
||||
assert!(check_equivocation(&client, 3.into(), 2.into(), &header1, &public)
|
||||
.unwrap()
|
||||
.is_none(),);
|
||||
|
||||
// But not two different headers at the same slot.
|
||||
assert!(check_equivocation(&client, 4.into(), 2.into(), &header2, &public,)
|
||||
assert!(check_equivocation(&client, 4.into(), 2.into(), &header2, &public)
|
||||
.unwrap()
|
||||
.is_some(),);
|
||||
|
||||
// Different slot is ok.
|
||||
assert!(check_equivocation(&client, 5.into(), 4.into(), &header3, &public,)
|
||||
assert!(check_equivocation(&client, 5.into(), 4.into(), &header3, &public)
|
||||
.unwrap()
|
||||
.is_none(),);
|
||||
|
||||
|
||||
@@ -318,7 +318,7 @@ pub trait SimpleSlotWorker<B: BlockT> {
|
||||
let proposal = match futures::future::select(proposing, proposing_remaining).await {
|
||||
Either::Left((Ok(p), _)) => p,
|
||||
Either::Left((Err(err), _)) => {
|
||||
warn!(target: logging_target, "Proposing failed: {:?}", err,);
|
||||
warn!(target: logging_target, "Proposing failed: {:?}", err);
|
||||
|
||||
return None
|
||||
},
|
||||
@@ -363,7 +363,7 @@ pub trait SimpleSlotWorker<B: BlockT> {
|
||||
) {
|
||||
Ok(bi) => bi,
|
||||
Err(err) => {
|
||||
warn!(target: logging_target, "Failed to create block import params: {:?}", err,);
|
||||
warn!(target: logging_target, "Failed to create block import params: {:?}", err);
|
||||
|
||||
return None
|
||||
},
|
||||
@@ -922,7 +922,7 @@ mod test {
|
||||
}
|
||||
|
||||
// but we cap it to a maximum of 20 slots
|
||||
assert_eq!(super::slot_lenience_linear(1u64.into(), &slot(23)), Some(SLOT_DURATION * 20),);
|
||||
assert_eq!(super::slot_lenience_linear(1u64.into(), &slot(23)), Some(SLOT_DURATION * 20));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -33,7 +33,7 @@ pub fn duration_now() -> Duration {
|
||||
use std::time::SystemTime;
|
||||
let now = SystemTime::now();
|
||||
now.duration_since(SystemTime::UNIX_EPOCH).unwrap_or_else(|e| {
|
||||
panic!("Current time {:?} is before unix epoch. Something is wrong: {:?}", now, e,)
|
||||
panic!("Current time {:?} is before unix epoch. Something is wrong: {:?}", now, e)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user