Skip to content

Commit

Permalink
clippy: Replaces .get(0) with .first() (solana-labs#34143)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Nov 17, 2023
1 parent 4cbd57e commit 851be08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runtime/benches/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,21 +89,21 @@ fn async_bencher(bank: &Bank, bank_client: &BankClient, transactions: &[Transact
}
for _ in 0..1_000_000_000_u64 {
if bank
.get_signature_status(transactions.last().unwrap().signatures.get(0).unwrap())
.get_signature_status(transactions.last().unwrap().signatures.first().unwrap())
.is_some()
{
break;
}
sleep(Duration::from_nanos(1));
}
if bank
.get_signature_status(transactions.last().unwrap().signatures.get(0).unwrap())
.get_signature_status(transactions.last().unwrap().signatures.first().unwrap())
.unwrap()
.is_err()
{
error!(
"transaction failed: {:?}",
bank.get_signature_status(transactions.last().unwrap().signatures.get(0).unwrap())
bank.get_signature_status(transactions.last().unwrap().signatures.first().unwrap())
.unwrap()
);
panic!();
Expand Down

0 comments on commit 851be08

Please sign in to comment.