Address latest nightly clippy lints, but globally disable stable_sort_primitive

This commit is contained in:
Michael Vines
2020-08-14 11:43:14 -07:00
parent a86397a650
commit d15173ad9d
13 changed files with 27 additions and 3 deletions

View File

@ -109,6 +109,7 @@ fn make_accounts_txs(txes: usize, mint_keypair: &Keypair, hash: Hash) -> Vec<Tra
.collect()
}
#[allow(clippy::same_item_push)]
fn make_programs_txs(txes: usize, hash: Hash) -> Vec<Transaction> {
let progs = 4;
(0..txes)
@ -294,6 +295,7 @@ fn simulate_process_entries(
process_entries(&bank, &[entry], randomize_txs, None, None).unwrap();
}
#[allow(clippy::same_item_push)]
fn bench_process_entries(randomize_txs: bool, bencher: &mut Bencher) {
// entropy multiplier should be big enough to provide sufficient entropy
// but small enough to not take too much time while executing the test.

View File

@ -27,6 +27,7 @@ use std::time::Duration;
use test::Bencher;
#[bench]
#[allow(clippy::same_item_push)]
fn bench_retransmitter(bencher: &mut Bencher) {
solana_logger::setup();
let cluster_info = ClusterInfo::new_with_invalid_keypair(Node::new_localhost().info);

View File

@ -203,6 +203,7 @@ impl BroadcastStage {
/// which will then close FetchStage in the Tpu, and then the rest of the Tpu,
/// completing the cycle.
#[allow(clippy::too_many_arguments)]
#[allow(clippy::same_item_push)]
fn new(
socks: Vec<UdpSocket>,
cluster_info: Arc<ClusterInfo>,

View File

@ -3345,6 +3345,7 @@ mod tests {
}
#[test]
#[allow(clippy::same_item_push)]
fn test_push_epoch_slots_large() {
use rand::Rng;
let node_keypair = Arc::new(Keypair::new());

View File

@ -451,6 +451,7 @@ mod tests {
}
#[test]
#[allow(clippy::same_item_push)]
fn test_epoch_slots_fill_uncompressed_random_range() {
use rand::Rng;
for _ in 0..10 {
@ -469,6 +470,7 @@ mod tests {
}
#[test]
#[allow(clippy::same_item_push)]
fn test_epoch_slots_fill_compressed_random_range() {
use rand::Rng;
for _ in 0..10 {
@ -489,6 +491,7 @@ mod tests {
}
#[test]
#[allow(clippy::same_item_push)]
fn test_epoch_slots_fill_random_range() {
use rand::Rng;
for _ in 0..10 {