Reformat imports to a consistent style for imports

rustfmt.toml configuration:
  imports_granularity = "One"
  group_imports = "One"
This commit is contained in:
Michael Vines
2021-12-03 09:00:31 -08:00
parent 0ef1b25e4b
commit b8837c04ec
397 changed files with 5990 additions and 5175 deletions

View File

@ -26,8 +26,7 @@ use {
MAX_GET_SIGNATURE_STATUSES_QUERY_ITEMS, MAX_GET_SLOT_LEADERS, MAX_MULTIPLE_ACCOUNTS,
NUM_LARGEST_ACCOUNTS,
},
rpc_response::Response as RpcResponse,
rpc_response::*,
rpc_response::{Response as RpcResponse, *},
},
solana_faucet::faucet::request_airdrop_transaction,
solana_gossip::{cluster_info::ClusterInfo, contact_info::ContactInfo},
@ -4338,8 +4337,7 @@ pub mod tests {
},
spl_token::{
solana_program::{program_option::COption, pubkey::Pubkey as SplTokenPubkey},
state::AccountState as TokenAccountState,
state::Mint,
state::{AccountState as TokenAccountState, Mint},
},
std::collections::HashMap,
};

View File

@ -3,8 +3,10 @@ use {
solana_sdk::{clock::Slot, pubkey::Pubkey},
std::{
collections::HashSet,
sync::atomic::{AtomicBool, Ordering},
sync::Arc,
sync::{
atomic::{AtomicBool, Ordering},
Arc,
},
},
};

View File

@ -187,9 +187,13 @@ pub struct TestBroadcastReceiver {
#[cfg(test)]
impl TestBroadcastReceiver {
pub fn recv(&mut self) -> String {
use std::thread::sleep;
use std::time::{Duration, Instant};
use tokio::sync::broadcast::error::TryRecvError;
use {
std::{
thread::sleep,
time::{Duration, Instant},
},
tokio::sync::broadcast::error::TryRecvError,
};
let timeout = Duration::from_secs(5);
let started = Instant::now();

View File

@ -40,8 +40,11 @@ use {
collections::HashSet,
net::SocketAddr,
path::{Path, PathBuf},
sync::atomic::{AtomicBool, AtomicU64, Ordering},
sync::{mpsc::channel, Arc, Mutex, RwLock},
sync::{
atomic::{AtomicBool, AtomicU64, Ordering},
mpsc::channel,
Arc, Mutex, RwLock,
},
thread::{self, Builder, JoinHandle},
},
tokio_util::codec::{BytesCodec, FramedRead},

View File

@ -535,11 +535,13 @@ impl SubscriptionToken {
#[cfg(test)]
mod tests {
use super::*;
use crate::rpc_pubsub_service::PubSubConfig;
use solana_ledger::genesis_utils::{create_genesis_config, GenesisConfigInfo};
use solana_runtime::bank::Bank;
use std::str::FromStr;
use {
super::*,
crate::rpc_pubsub_service::PubSubConfig,
solana_ledger::genesis_utils::{create_genesis_config, GenesisConfigInfo},
solana_runtime::bank::Bank,
std::str::FromStr,
};
struct ControlWrapper {
control: SubscriptionControl,

View File

@ -48,8 +48,7 @@ use {
Arc, Mutex, RwLock, Weak,
},
thread::{Builder, JoinHandle},
time::Duration,
time::Instant,
time::{Duration, Instant},
},
tokio::sync::broadcast,
};