Pacify clippy

This commit is contained in:
Michael Vines
2022-01-21 16:01:22 -08:00
parent ce4f7601af
commit 6d5bbca630
37 changed files with 157 additions and 194 deletions

View File

@ -435,7 +435,7 @@ impl RpcSender for MockSender {
value: vec![Value::Null, Value::Null]
})?,
"getProgramAccounts" => {
let pubkey = Pubkey::from_str(&PUBKEY.to_string()).unwrap();
let pubkey = Pubkey::from_str(PUBKEY).unwrap();
let account = Account {
lamports: 1_000_000,
data: vec![],

View File

@ -43,18 +43,16 @@ pub fn sample_txs<T>(
total_elapsed = start_time.elapsed();
let elapsed = now.elapsed();
now = Instant::now();
let mut txs;
match client.get_transaction_count_with_commitment(CommitmentConfig::processed()) {
Err(e) => {
// ThinClient with multiple options should pick a better one now.
info!("Couldn't get transaction count {:?}", e);
sleep(Duration::from_secs(sample_period));
continue;
}
Ok(tx_count) => {
txs = tx_count;
}
}
let mut txs =
match client.get_transaction_count_with_commitment(CommitmentConfig::processed()) {
Err(e) => {
// ThinClient with multiple options should pick a better one now.
info!("Couldn't get transaction count {:?}", e);
sleep(Duration::from_secs(sample_period));
continue;
}
Ok(tx_count) => tx_count,
};
if txs < last_txs {
info!("Expected txs({}) >= last_txs({})", txs, last_txs);