Add rustfmt.toml and cargo fmt (#23238)

* fmt

* formatted

Co-authored-by: Lucas B <buffalu@jito.network>
This commit is contained in:
buffalu
2022-02-18 23:32:29 -06:00
committed by GitHub
parent 1add82aa9e
commit 70ebab2c82
33 changed files with 127 additions and 108 deletions

View File

@ -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,

View File

@ -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