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

@@ -1,20 +1,21 @@
//! ReadOnlyAccountsCache used to store accounts, such as executable accounts,
//! which can be large, loaded many times, and rarely change.
use dashmap::{mapref::entry::Entry, DashMap};
//use mapref::entry::{Entry, OccupiedEntry, VacantEntry};
use solana_sdk::{
account::{AccountSharedData, ReadableAccount},
clock::Slot,
pubkey::Pubkey,
};
use std::thread::{sleep, Builder, JoinHandle};
use std::time::Duration;
use std::{
sync::{
atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering},
Arc, RwLock,
use {
dashmap::{mapref::entry::Entry, DashMap},
solana_sdk::{
account::{AccountSharedData, ReadableAccount},
clock::Slot,
pubkey::Pubkey,
},
std::{
sync::{
atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering},
Arc, RwLock,
},
thread::{sleep, Builder, JoinHandle},
time::{Duration, Instant},
},
time::Instant,
};
type ReadOnlyCacheKey = (Pubkey, Slot);
@@ -240,8 +241,10 @@ impl ReadOnlyAccountsCache {
#[cfg(test)]
pub mod tests {
use super::*;
use solana_sdk::account::{accounts_equal, Account, WritableAccount};
use {
super::*,
solana_sdk::account::{accounts_equal, Account, WritableAccount},
};
#[test]
fn test_accountsdb_sizeof() {
// size_of(arc(x)) does not return the size of x