Add rustfmt.toml and cargo fmt
(#23238)
* fmt * formatted Co-authored-by: Lucas B <buffalu@jito.network>
This commit is contained in:
@ -24,10 +24,10 @@ pub mod solana_client {
|
||||
}
|
||||
|
||||
pub mod rpc_client {
|
||||
use super::super::solana_sdk::{
|
||||
hash::Hash, signature::Signature, transaction::Transaction,
|
||||
use super::{
|
||||
super::solana_sdk::{hash::Hash, signature::Signature, transaction::Transaction},
|
||||
client_error::Result as ClientResult,
|
||||
};
|
||||
use super::client_error::Result as ClientResult;
|
||||
|
||||
pub struct RpcClient;
|
||||
|
||||
@ -63,12 +63,7 @@ pub mod solana_client {
|
||||
/// This lets examples in solana-program appear to be written as client
|
||||
/// programs.
|
||||
pub mod solana_sdk {
|
||||
pub use crate::hash;
|
||||
pub use crate::instruction;
|
||||
pub use crate::message;
|
||||
pub use crate::nonce;
|
||||
pub use crate::pubkey;
|
||||
pub use crate::system_instruction;
|
||||
pub use crate::{hash, instruction, message, nonce, pubkey, system_instruction};
|
||||
|
||||
pub mod signature {
|
||||
use crate::pubkey::Pubkey;
|
||||
@ -103,11 +98,10 @@ pub mod solana_sdk {
|
||||
}
|
||||
|
||||
pub mod transaction {
|
||||
use super::signers::Signers;
|
||||
use crate::hash::Hash;
|
||||
use crate::instruction::Instruction;
|
||||
use crate::message::Message;
|
||||
use crate::pubkey::Pubkey;
|
||||
use {
|
||||
super::signers::Signers,
|
||||
crate::{hash::Hash, instruction::Instruction, message::Message, pubkey::Pubkey},
|
||||
};
|
||||
|
||||
pub struct Transaction {
|
||||
pub message: Message,
|
||||
|
@ -2,13 +2,12 @@
|
||||
//!
|
||||
//! this account carries the Bank's most recent bank hashes for some N parents
|
||||
//!
|
||||
pub use crate::clock::Slot;
|
||||
use {
|
||||
crate::hash::Hash,
|
||||
std::{iter::FromIterator, ops::Deref},
|
||||
};
|
||||
|
||||
pub use crate::clock::Slot;
|
||||
|
||||
pub const MAX_ENTRIES: usize = 512; // about 2.5 minutes to get your vote in
|
||||
|
||||
// This is to allow tests with custom slot hash expiry to avoid having to generate
|
||||
|
@ -24,8 +24,10 @@ pub mod solana_client {
|
||||
}
|
||||
|
||||
pub mod rpc_client {
|
||||
use super::client_error::Result as ClientResult;
|
||||
use crate::{hash::Hash, signature::Signature, transaction::Transaction};
|
||||
use {
|
||||
super::client_error::Result as ClientResult,
|
||||
crate::{hash::Hash, signature::Signature, transaction::Transaction},
|
||||
};
|
||||
|
||||
pub struct RpcClient;
|
||||
|
||||
|
@ -1,15 +1,17 @@
|
||||
//! Successors of instruction_context_context::StackFrame, KeyedAccount and AccountInfo
|
||||
|
||||
use crate::{
|
||||
account::{AccountSharedData, ReadableAccount, WritableAccount},
|
||||
instruction::InstructionError,
|
||||
lamports::LamportsError,
|
||||
pubkey::Pubkey,
|
||||
};
|
||||
use std::{
|
||||
cell::{RefCell, RefMut},
|
||||
collections::HashSet,
|
||||
pin::Pin,
|
||||
use {
|
||||
crate::{
|
||||
account::{AccountSharedData, ReadableAccount, WritableAccount},
|
||||
instruction::InstructionError,
|
||||
lamports::LamportsError,
|
||||
pubkey::Pubkey,
|
||||
},
|
||||
std::{
|
||||
cell::{RefCell, RefMut},
|
||||
collections::HashSet,
|
||||
pin::Pin,
|
||||
},
|
||||
};
|
||||
|
||||
pub type TransactionAccount = (Pubkey, AccountSharedData);
|
||||
|
@ -2,11 +2,7 @@
|
||||
#![cfg(target_arch = "wasm32")]
|
||||
#![allow(non_snake_case)]
|
||||
use {
|
||||
crate::{
|
||||
hash::Hash,
|
||||
signer::keypair::Keypair,
|
||||
{message::Message, transaction::Transaction},
|
||||
},
|
||||
crate::{hash::Hash, message::Message, signer::keypair::Keypair, transaction::Transaction},
|
||||
solana_program::{
|
||||
pubkey::Pubkey,
|
||||
wasm::{display_to_jsvalue, instructions::Instructions},
|
||||
|
Reference in New Issue
Block a user