From d0e85c293ff88b7ad19c67df1d3d3f980b09508e Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Wed, 23 Feb 2022 16:38:53 +0800 Subject: [PATCH] Fix rustfmt check (#23296) --- core/src/progress_map.rs | 5 ++--- ledger/src/blockstore_processor.rs | 4 +--- program-runtime/src/timings.rs | 11 ++++++----- runtime/src/bank.rs | 3 +-- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/core/src/progress_map.rs b/core/src/progress_map.rs index 7e9f083a1..c127d8c3d 100644 --- a/core/src/progress_map.rs +++ b/core/src/progress_map.rs @@ -1,6 +1,3 @@ -use solana_program_runtime::timings::ExecuteTimingType; -use std::ops::Index; - use { crate::{ cluster_info_vote_listener::SlotVoteTracker, @@ -9,10 +6,12 @@ use { replay_stage::SUPERMINORITY_THRESHOLD, }, solana_ledger::blockstore_processor::{ConfirmationProgress, ConfirmationTiming}, + solana_program_runtime::timings::ExecuteTimingType, solana_runtime::{bank::Bank, bank_forks::BankForks, vote_account::VoteAccount}, solana_sdk::{clock::Slot, hash::Hash, pubkey::Pubkey}, std::{ collections::{BTreeMap, HashMap, HashSet}, + ops::Index, sync::{Arc, RwLock}, time::Instant, }, diff --git a/ledger/src/blockstore_processor.rs b/ledger/src/blockstore_processor.rs index ec9deba79..e24819b10 100644 --- a/ledger/src/blockstore_processor.rs +++ b/ledger/src/blockstore_processor.rs @@ -1,5 +1,3 @@ -use solana_program_runtime::timings::ExecuteTimingType; - use { crate::{ block_error::BlockError, blockstore::Blockstore, blockstore_db::BlockstoreError, @@ -16,7 +14,7 @@ use { }, solana_measure::measure::Measure, solana_metrics::{datapoint_error, inc_new_counter_debug}, - solana_program_runtime::timings::ExecuteTimings, + solana_program_runtime::timings::{ExecuteTimingType, ExecuteTimings}, solana_rayon_threadlimit::get_thread_count, solana_runtime::{ accounts_db::{AccountShrinkThreshold, AccountsDbConfig}, diff --git a/program-runtime/src/timings.rs b/program-runtime/src/timings.rs index 814349304..1a2270671 100644 --- a/program-runtime/src/timings.rs +++ b/program-runtime/src/timings.rs @@ -1,10 +1,11 @@ -use core::fmt; -use enum_iterator::IntoEnumIterator; -use std::ops::{Index, IndexMut}; - use { + core::fmt, + enum_iterator::IntoEnumIterator, solana_sdk::{pubkey::Pubkey, saturating_add_assign}, - std::collections::HashMap, + std::{ + collections::HashMap, + ops::{Index, IndexMut}, + }, }; #[derive(Default, Debug, PartialEq)] diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 1cf0a936f..3a58c1b52 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -33,7 +33,6 @@ //! It offers a high-level API that signs transactions //! on behalf of the caller, and a low-level API for when they have //! already been signed and verified. -use solana_program_runtime::timings::ExecuteTimingType; #[allow(deprecated)] use solana_sdk::recent_blockhashes_account; use { @@ -82,7 +81,7 @@ use { }, log_collector::LogCollector, sysvar_cache::SysvarCache, - timings::ExecuteTimings, + timings::{ExecuteTimingType, ExecuteTimings}, }, solana_sdk::{ account::{