Reformat imports to a consistent style for imports
rustfmt.toml configuration: imports_granularity = "One" group_imports = "One"
This commit is contained in:
@ -44,10 +44,12 @@ use {
|
||||
bind_common, bind_common_in_range, bind_in_range, find_available_port_in_range,
|
||||
multi_bind_in_range, PortRange,
|
||||
},
|
||||
solana_perf::data_budget::DataBudget,
|
||||
solana_perf::packet::{
|
||||
limited_deserialize, to_packets_with_destination, Packet, Packets, PacketsRecycler,
|
||||
PACKET_DATA_SIZE,
|
||||
solana_perf::{
|
||||
data_budget::DataBudget,
|
||||
packet::{
|
||||
limited_deserialize, to_packets_with_destination, Packet, Packets, PacketsRecycler,
|
||||
PACKET_DATA_SIZE,
|
||||
},
|
||||
},
|
||||
solana_rayon_threadlimit::get_thread_count,
|
||||
solana_runtime::bank_forks::BankForks,
|
||||
@ -84,7 +86,7 @@ use {
|
||||
sync::{
|
||||
atomic::{AtomicBool, Ordering},
|
||||
mpsc::{Receiver, RecvTimeoutError, Sender},
|
||||
{Arc, Mutex, RwLock, RwLockReadGuard},
|
||||
Arc, Mutex, RwLock, RwLockReadGuard,
|
||||
},
|
||||
thread::{sleep, Builder, JoinHandle},
|
||||
time::{Duration, Instant},
|
||||
|
@ -9,13 +9,13 @@ use {
|
||||
bincode::{serialize, serialized_size},
|
||||
rand::{CryptoRng, Rng},
|
||||
serde::de::{Deserialize, Deserializer},
|
||||
solana_sdk::sanitize::{Sanitize, SanitizeError},
|
||||
solana_sdk::timing::timestamp,
|
||||
solana_sdk::{
|
||||
clock::Slot,
|
||||
hash::Hash,
|
||||
pubkey::{self, Pubkey},
|
||||
sanitize::{Sanitize, SanitizeError},
|
||||
signature::{Keypair, Signable, Signature, Signer},
|
||||
timing::timestamp,
|
||||
transaction::Transaction,
|
||||
},
|
||||
solana_vote_program::vote_transaction::parse_vote_transaction,
|
||||
|
@ -280,12 +280,18 @@ impl Sanitize for DuplicateShred {
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) mod tests {
|
||||
use super::*;
|
||||
use rand::Rng;
|
||||
use solana_entry::entry::Entry;
|
||||
use solana_ledger::shred::Shredder;
|
||||
use solana_sdk::{hash, signature::Keypair, signature::Signer, system_transaction};
|
||||
use std::sync::Arc;
|
||||
use {
|
||||
super::*,
|
||||
rand::Rng,
|
||||
solana_entry::entry::Entry,
|
||||
solana_ledger::shred::Shredder,
|
||||
solana_sdk::{
|
||||
hash,
|
||||
signature::{Keypair, Signer},
|
||||
system_transaction,
|
||||
},
|
||||
std::sync::Arc,
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn test_duplicate_shred_header_size() {
|
||||
|
@ -13,15 +13,14 @@ use {
|
||||
pubkey::Pubkey,
|
||||
signature::{Keypair, Signer},
|
||||
},
|
||||
solana_streamer::socket::SocketAddrSpace,
|
||||
solana_streamer::streamer,
|
||||
solana_streamer::{socket::SocketAddrSpace, streamer},
|
||||
std::{
|
||||
collections::HashSet,
|
||||
net::{IpAddr, Ipv4Addr, SocketAddr, TcpListener, UdpSocket},
|
||||
sync::{
|
||||
atomic::{AtomicBool, Ordering},
|
||||
mpsc::channel,
|
||||
{Arc, RwLock},
|
||||
Arc, RwLock,
|
||||
},
|
||||
thread::{self, sleep, JoinHandle},
|
||||
time::{Duration, Instant},
|
||||
|
@ -224,8 +224,10 @@ pub fn weighted_best(weights_and_indexes: &[(u64, usize)], seed: [u8; 32]) -> us
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use std::{convert::TryInto, iter::repeat_with};
|
||||
use {
|
||||
super::*,
|
||||
std::{convert::TryInto, iter::repeat_with},
|
||||
};
|
||||
|
||||
fn weighted_shuffle_slow<R>(rng: &mut R, mut weights: Vec<u64>) -> Vec<usize>
|
||||
where
|
||||
|
Reference in New Issue
Block a user