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

@@ -8,51 +8,53 @@ pub mod upgradeable;
pub mod upgradeable_with_jit;
pub mod with_jit;
use crate::{
serialization::{deserialize_parameters, serialize_parameters},
syscalls::SyscallError,
};
use log::{log_enabled, trace, Level::Trace};
use solana_measure::measure::Measure;
use solana_program_runtime::{
ic_logger_msg, ic_msg,
invoke_context::{ComputeMeter, Executor, InvokeContext},
log_collector::LogCollector,
stable_log,
};
use solana_rbpf::{
aligned_memory::AlignedMemory,
ebpf::HOST_ALIGN,
elf::Executable,
error::{EbpfError, UserDefinedError},
static_analysis::Analysis,
verifier::{self, VerifierError},
vm::{Config, EbpfVm, InstructionMeter},
};
use solana_sdk::{
account::{ReadableAccount, WritableAccount},
account_utils::State,
bpf_loader, bpf_loader_deprecated,
bpf_loader_upgradeable::{self, UpgradeableLoaderState},
clock::Clock,
entrypoint::{HEAP_LENGTH, SUCCESS},
feature_set::{
do_support_realloc, reduce_required_deploy_balance,
reject_deployment_of_unresolved_syscalls,
reject_section_virtual_address_file_offset_mismatch, requestable_heap_size,
start_verify_shift32_imm, stop_verify_mul64_imm_nonzero,
use {
crate::{
serialization::{deserialize_parameters, serialize_parameters},
syscalls::SyscallError,
},
instruction::{AccountMeta, InstructionError},
keyed_account::{from_keyed_account, keyed_account_at_index, KeyedAccount},
loader_instruction::LoaderInstruction,
loader_upgradeable_instruction::UpgradeableLoaderInstruction,
program_utils::limited_deserialize,
pubkey::Pubkey,
rent::Rent,
system_instruction::{self, MAX_PERMITTED_DATA_LENGTH},
log::{log_enabled, trace, Level::Trace},
solana_measure::measure::Measure,
solana_program_runtime::{
ic_logger_msg, ic_msg,
invoke_context::{ComputeMeter, Executor, InvokeContext},
log_collector::LogCollector,
stable_log,
},
solana_rbpf::{
aligned_memory::AlignedMemory,
ebpf::HOST_ALIGN,
elf::Executable,
error::{EbpfError, UserDefinedError},
static_analysis::Analysis,
verifier::{self, VerifierError},
vm::{Config, EbpfVm, InstructionMeter},
},
solana_sdk::{
account::{ReadableAccount, WritableAccount},
account_utils::State,
bpf_loader, bpf_loader_deprecated,
bpf_loader_upgradeable::{self, UpgradeableLoaderState},
clock::Clock,
entrypoint::{HEAP_LENGTH, SUCCESS},
feature_set::{
do_support_realloc, reduce_required_deploy_balance,
reject_deployment_of_unresolved_syscalls,
reject_section_virtual_address_file_offset_mismatch, requestable_heap_size,
start_verify_shift32_imm, stop_verify_mul64_imm_nonzero,
},
instruction::{AccountMeta, InstructionError},
keyed_account::{from_keyed_account, keyed_account_at_index, KeyedAccount},
loader_instruction::LoaderInstruction,
loader_upgradeable_instruction::UpgradeableLoaderInstruction,
program_utils::limited_deserialize,
pubkey::Pubkey,
rent::Rent,
system_instruction::{self, MAX_PERMITTED_DATA_LENGTH},
},
std::{cell::RefCell, fmt::Debug, rc::Rc, sync::Arc},
thiserror::Error,
};
use std::{cell::RefCell, fmt::Debug, rc::Rc, sync::Arc};
use thiserror::Error;
solana_sdk::declare_builtin!(
solana_sdk::bpf_loader::ID,
@@ -1083,30 +1085,32 @@ impl Executor for BpfExecutor {
#[cfg(test)]
mod tests {
use super::*;
use rand::Rng;
use solana_program_runtime::invoke_context::mock_process_instruction;
use solana_rbpf::vm::SyscallRegistry;
use solana_runtime::{bank::Bank, bank_client::BankClient};
use solana_sdk::{
account::{
create_account_shared_data_for_test as create_account_for_test, AccountSharedData,
use {
super::*,
rand::Rng,
solana_program_runtime::invoke_context::mock_process_instruction,
solana_rbpf::vm::SyscallRegistry,
solana_runtime::{bank::Bank, bank_client::BankClient},
solana_sdk::{
account::{
create_account_shared_data_for_test as create_account_for_test, AccountSharedData,
},
account_utils::StateMut,
client::SyncClient,
clock::Clock,
feature_set::FeatureSet,
genesis_config::create_genesis_config,
instruction::{AccountMeta, Instruction, InstructionError},
message::Message,
native_token::LAMPORTS_PER_SOL,
pubkey::Pubkey,
rent::Rent,
signature::{Keypair, Signer},
system_program, sysvar,
transaction::TransactionError,
},
account_utils::StateMut,
client::SyncClient,
clock::Clock,
feature_set::FeatureSet,
genesis_config::create_genesis_config,
instruction::{AccountMeta, Instruction, InstructionError},
message::Message,
native_token::LAMPORTS_PER_SOL,
pubkey::Pubkey,
rent::Rent,
signature::{Keypair, Signer},
system_program, sysvar,
transaction::TransactionError,
std::{cell::RefCell, fs::File, io::Read, ops::Range, rc::Rc, sync::Arc},
};
use std::{cell::RefCell, fs::File, io::Read, ops::Range, rc::Rc, sync::Arc};
struct TestInstructionMeter {
remaining: u64,