diff --git a/src/accountant.rs b/src/accountant.rs index 472cf2f19cd769..3be68a8d76be7c 100644 --- a/src/accountant.rs +++ b/src/accountant.rs @@ -160,7 +160,7 @@ impl Accountant { return match result { Ok(_) => Ok(()), Err(_) => Err(AccountingError::BalanceUpdatedBeforeTransactionCompleted), - } + }; } pub fn process_verified_transaction_credits(&self, tr: &Transaction) { @@ -181,10 +181,8 @@ impl Accountant { Ok(_) => { self.process_verified_transaction_credits(tr); Ok(()) - }, - Err(err) => { - Err(err) } + Err(err) => Err(err), }; } diff --git a/src/accountant_skel.rs b/src/accountant_skel.rs index 598cc54e58e492..0c31c2b20adc7d 100644 --- a/src/accountant_skel.rs +++ b/src/accountant_skel.rs @@ -777,8 +777,8 @@ mod bench { let tr = Transaction::new(&mint.keypair(), rando0.pubkey(), 1_000, last_id); // some of these will fail because balance updates before transaction completes match acc.process_verified_transaction(&tr) { - Ok(_) => (), - Err(_) => *errors.lock().unwrap() += 1, + Ok(_) => (), + Err(_) => *errors.lock().unwrap() += 1, }; let rando1 = KeyPair::new(); @@ -810,7 +810,10 @@ mod bench { drop(skel.historian.sender); let entries: Vec = skel.historian.receiver.iter().collect(); assert_eq!(entries.len(), 1); - assert_eq!(entries[0].events.len() + *errors.lock().unwrap(), txs as usize); + assert_eq!( + entries[0].events.len() + *errors.lock().unwrap(), + txs as usize + ); println!("{} tps", tps); }