Clippy cleanup for all targets and nighly rust (also support 1.44.0) (#10445)

* address warnings from 'rustup run beta cargo clippy --workspace'

minor refactoring in:
- cli/src/cli.rs
- cli/src/offline/blockhash_query.rs
- logger/src/lib.rs
- runtime/src/accounts_db.rs

expect some performance improvement AccountsDB::clean_accounts()

* address warnings from 'rustup run beta cargo clippy --workspace --tests'

* address warnings from 'rustup run nightly cargo clippy --workspace --all-targets'

* rustfmt

* fix warning stragglers

* properly fix clippy warnings test_vote_subscribe()
replace ref-to-arc with ref parameters where arc not cloned

* Remove lock around JsonRpcRequestProcessor (#10417)

automerge

* make ancestors parameter optional to avoid forcing construction of empty hash maps

Co-authored-by: Greg Fitzgerald <greg@solana.com>
This commit is contained in:
Kristofer Peterson
2020-06-09 01:38:14 +01:00
committed by GitHub
parent fa3a6c5584
commit e23340d89e
63 changed files with 258 additions and 308 deletions

View File

@ -20,7 +20,7 @@ fn bench_sigverify_shreds_sign_gpu(bencher: &mut Bencher) {
let mut packets = Packets::default();
packets.packets.set_pinnable();
let slot = 0xdeadc0de;
let slot = 0xdead_c0de;
// need to pin explicitly since the resize will not cause re-allocation
packets.packets.reserve_and_pin(NUM_PACKETS);
packets.packets.resize(NUM_PACKETS, Packet::default());
@ -54,7 +54,7 @@ fn bench_sigverify_shreds_sign_gpu(bencher: &mut Bencher) {
#[bench]
fn bench_sigverify_shreds_sign_cpu(bencher: &mut Bencher) {
let mut packets = Packets::default();
let slot = 0xdeadc0de;
let slot = 0xdead_c0de;
packets.packets.resize(NUM_PACKETS, Packet::default());
for p in packets.packets.iter_mut() {
let shred = Shred::new_from_data(