diff --git a/account-decoder/src/lib.rs b/account-decoder/src/lib.rs index d1b01ac53d5b5b..e93f4abd66c196 100644 --- a/account-decoder/src/lib.rs +++ b/account-decoder/src/lib.rs @@ -203,4 +203,3 @@ fn slice_data(data: &[u8], data_slice_config: Option) -> &[u8 data } } - diff --git a/accounts-cluster-bench/src/main.rs b/accounts-cluster-bench/src/main.rs index 54b4b76c2c4251..c09e9516b5752c 100644 --- a/accounts-cluster-bench/src/main.rs +++ b/accounts-cluster-bench/src/main.rs @@ -700,4 +700,3 @@ fn main() { matches.is_present("reclaim_accounts"), ); } - diff --git a/banks-client/src/lib.rs b/banks-client/src/lib.rs index 5f4741f268a6db..d381df0ee84365 100644 --- a/banks-client/src/lib.rs +++ b/banks-client/src/lib.rs @@ -524,4 +524,3 @@ pub async fn start_tcp_client(addr: T) -> Result Option; } - diff --git a/core/src/banking_trace.rs b/core/src/banking_trace.rs index 5206215192c51a..7ed11de6ddac2f 100644 --- a/core/src/banking_trace.rs +++ b/core/src/banking_trace.rs @@ -4,9 +4,7 @@ use { chrono::{DateTime, Local}, crossbeam_channel::{unbounded, Receiver, SendError, Sender, TryRecvError}, rolling_file::{RollingCondition, RollingConditionBasic, RollingFileAppender}, - solana_perf::{ - packet::{to_packet_batches, PacketBatch}, - }, + solana_perf::packet::{to_packet_batches, PacketBatch}, solana_sdk::{hash::Hash, slot_history::Slot}, std::{ fs::{create_dir_all, remove_dir_all}, diff --git a/core/src/lib.rs b/core/src/lib.rs index 5ebdeeddfb6aae..19ee976b7bfcc1 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -102,4 +102,3 @@ extern crate solana_metrics; #[macro_use] extern crate solana_frozen_abi_macro; - diff --git a/dos/src/main.rs b/dos/src/main.rs index d408be15f712b8..5be17406b2a8cd 100644 --- a/dos/src/main.rs +++ b/dos/src/main.rs @@ -781,4 +781,3 @@ fn main() { run_dos(&nodes, 0, client, cmd_params); } - diff --git a/frozen-abi/src/lib.rs b/frozen-abi/src/lib.rs index d5c235d34d3938..6b470d4bd94c23 100644 --- a/frozen-abi/src/lib.rs +++ b/frozen-abi/src/lib.rs @@ -15,4 +15,3 @@ mod hash; #[cfg(RUSTC_WITH_SPECIALIZATION)] #[macro_use] extern crate solana_frozen_abi_macro; - diff --git a/genesis/src/main.rs b/genesis/src/main.rs index 59b7db9ebdcbf3..264f45a86f9d22 100644 --- a/genesis/src/main.rs +++ b/genesis/src/main.rs @@ -700,4 +700,3 @@ fn main() -> Result<(), Box> { println!("{genesis_config}"); Ok(()) } - diff --git a/gossip/src/cluster_info.rs b/gossip/src/cluster_info.rs index b45e6f45ee5eee..d69589d76fb10c 100644 --- a/gossip/src/cluster_info.rs +++ b/gossip/src/cluster_info.rs @@ -195,8 +195,7 @@ pub(crate) struct PruneData { wallclock: u64, } -impl PruneData { -} +impl PruneData {} impl Sanitize for PruneData { fn sanitize(&self) -> Result<(), SanitizeError> { @@ -3183,4 +3182,3 @@ fn filter_on_shred_version( } } } - diff --git a/gossip/src/contact_info.rs b/gossip/src/contact_info.rs index 768afb0bd761a1..b28c5beceaefaf 100644 --- a/gossip/src/contact_info.rs +++ b/gossip/src/contact_info.rs @@ -236,7 +236,6 @@ impl ContactInfo { remove_socket!(remove_tvu, SOCKET_TAG_TVU); remove_socket!(remove_tvu_forwards, SOCKET_TAG_TVU_FORWARDS); - // Adds given IP address to self.addrs returning respective index. fn push_addr(&mut self, addr: IpAddr) -> Result { match self.addrs.iter().position(|k| k == &addr) { @@ -510,4 +509,3 @@ pub(crate) fn get_quic_socket(socket: &SocketAddr) -> Result .ok_or_else(|| Error::InvalidPort(socket.port()))?, )) } - diff --git a/gossip/src/crds.rs b/gossip/src/crds.rs index 255dffec62db97..51e084a9968a77 100644 --- a/gossip/src/crds.rs +++ b/gossip/src/crds.rs @@ -408,7 +408,6 @@ impl Crds { self.table.is_empty() } - pub(crate) fn par_values(&self) -> ParValues<'_, CrdsValueLabel, VersionedCrdsValue> { self.table.par_values() } @@ -710,4 +709,3 @@ impl CrdsStats { } } } - diff --git a/gossip/src/crds_entry.rs b/gossip/src/crds_entry.rs index a353ec3705ef3a..406b298f69fc7d 100644 --- a/gossip/src/crds_entry.rs +++ b/gossip/src/crds_entry.rs @@ -67,4 +67,3 @@ impl_crds_entry!( CrdsData::SnapshotHashes(snapshot_hashes), snapshot_hashes ); - diff --git a/gossip/src/crds_gossip.rs b/gossip/src/crds_gossip.rs index 6ba1a8da790c15..9765ad36963553 100644 --- a/gossip/src/crds_gossip.rs +++ b/gossip/src/crds_gossip.rs @@ -420,4 +420,3 @@ pub(crate) fn maybe_ping_gossip_addresses( }) .collect() } - diff --git a/gossip/src/crds_gossip_pull.rs b/gossip/src/crds_gossip_pull.rs index 0e82778d7e9369..5e5c2157dd3454 100644 --- a/gossip/src/crds_gossip_pull.rs +++ b/gossip/src/crds_gossip_pull.rs @@ -83,7 +83,6 @@ impl solana_sdk::sanitize::Sanitize for CrdsFilter { } impl CrdsFilter { - fn compute_mask(seed: u64, mask_bits: u32) -> u64 { assert!(seed <= 2u64.pow(mask_bits)); let seed: u64 = seed.checked_shl(64 - mask_bits).unwrap_or(0x0); @@ -554,4 +553,3 @@ impl<'a> Index<&Pubkey> for CrdsTimeouts<'a> { } } } - diff --git a/gossip/src/crds_gossip_push.rs b/gossip/src/crds_gossip_push.rs index c7d7d9aeb8dac2..ce3df5d53659e3 100644 --- a/gossip/src/crds_gossip_push.rs +++ b/gossip/src/crds_gossip_push.rs @@ -288,4 +288,3 @@ impl CrdsGossipPush { ) } } - diff --git a/gossip/src/crds_shards.rs b/gossip/src/crds_shards.rs index c89b9fb13c397d..9a01f9d8e13292 100644 --- a/gossip/src/crds_shards.rs +++ b/gossip/src/crds_shards.rs @@ -109,4 +109,3 @@ where } } } - diff --git a/gossip/src/crds_value.rs b/gossip/src/crds_value.rs index 21ce357f7f2915..5219f5c9739b4a 100644 --- a/gossip/src/crds_value.rs +++ b/gossip/src/crds_value.rs @@ -697,4 +697,3 @@ pub(crate) fn sanitize_wallclock(wallclock: u64) -> Result<(), SanitizeError> { Ok(()) } } - diff --git a/gossip/src/duplicate_shred.rs b/gossip/src/duplicate_shred.rs index 1d67f307e7561d..2f3cd349215bf4 100644 --- a/gossip/src/duplicate_shred.rs +++ b/gossip/src/duplicate_shred.rs @@ -253,4 +253,3 @@ impl Sanitize for DuplicateShred { self.from.sanitize() } } - diff --git a/gossip/src/duplicate_shred_handler.rs b/gossip/src/duplicate_shred_handler.rs index 107722be06e22e..2d51c75adaf42c 100644 --- a/gossip/src/duplicate_shred_handler.rs +++ b/gossip/src/duplicate_shred_handler.rs @@ -202,4 +202,3 @@ fn should_consume_slot( .entry(slot) .or_insert_with(|| blockstore.has_duplicate_shreds_in_slot(slot)) } - diff --git a/gossip/src/duplicate_shred_listener.rs b/gossip/src/duplicate_shred_listener.rs index 0ca281a0fb5fd6..1f5f9f63687e07 100644 --- a/gossip/src/duplicate_shred_listener.rs +++ b/gossip/src/duplicate_shred_listener.rs @@ -63,4 +63,3 @@ impl DuplicateShredListener { } } } - diff --git a/gossip/src/epoch_slots.rs b/gossip/src/epoch_slots.rs index 5725c754cc6da9..f3c0c4da2fe094 100644 --- a/gossip/src/epoch_slots.rs +++ b/gossip/src/epoch_slots.rs @@ -334,4 +334,3 @@ impl EpochSlots { epoch_slots } } - diff --git a/gossip/src/gossip_service.rs b/gossip/src/gossip_service.rs index 78be4dc295ae2e..b52e01d66d1bc5 100644 --- a/gossip/src/gossip_service.rs +++ b/gossip/src/gossip_service.rs @@ -328,4 +328,3 @@ pub fn make_gossip_node( ); (gossip_service, ip_echo, cluster_info) } - diff --git a/gossip/src/legacy_contact_info.rs b/gossip/src/legacy_contact_info.rs index 21aac151fcba06..04f9cbf9dad48d 100644 --- a/gossip/src/legacy_contact_info.rs +++ b/gossip/src/legacy_contact_info.rs @@ -179,7 +179,6 @@ impl LegacyContactInfo { self.wallclock = wallclock; } - get_socket!(gossip); get_socket!(tvu); get_socket!(tvu_forwards); @@ -258,4 +257,3 @@ impl TryFrom<&ContactInfo> for LegacyContactInfo { }) } } - diff --git a/gossip/src/ping_pong.rs b/gossip/src/ping_pong.rs index 28056c0efbfcf2..c01fc0e8ae3135 100644 --- a/gossip/src/ping_pong.rs +++ b/gossip/src/ping_pong.rs @@ -247,4 +247,3 @@ impl PingCache { self.pongs.put((node, socket), now); } } - diff --git a/gossip/src/push_active_set.rs b/gossip/src/push_active_set.rs index 8f7d2c39ac38a3..da52ae1007f663 100644 --- a/gossip/src/push_active_set.rs +++ b/gossip/src/push_active_set.rs @@ -172,4 +172,3 @@ fn get_stake_bucket(stake: Option<&u64>) -> usize { let bucket = u64::BITS - stake.leading_zeros(); (bucket as usize).min(NUM_PUSH_ACTIVE_SET_ENTRIES - 1) } - diff --git a/gossip/src/received_cache.rs b/gossip/src/received_cache.rs index d6bde4d56d088c..0e82a347ee2bea 100644 --- a/gossip/src/received_cache.rs +++ b/gossip/src/received_cache.rs @@ -54,7 +54,6 @@ impl ReceivedCache { .into_iter() .flatten() } - } impl ReceivedCacheEntry { @@ -115,4 +114,3 @@ impl ReceivedCacheEntry { .map(|(node, _stake)| node) } } - diff --git a/gossip/src/weighted_shuffle.rs b/gossip/src/weighted_shuffle.rs index defccbd7e5ef24..9dcb53181c0022 100644 --- a/gossip/src/weighted_shuffle.rs +++ b/gossip/src/weighted_shuffle.rs @@ -175,4 +175,3 @@ where }) } } - diff --git a/keygen/src/keygen.rs b/keygen/src/keygen.rs index 420dc468e8c9ff..dbffc28b3c8892 100644 --- a/keygen/src/keygen.rs +++ b/keygen/src/keygen.rs @@ -40,7 +40,6 @@ mod smallest_length_44_public_key { use solana_sdk::{pubkey, pubkey::Pubkey}; pub(super) static PUBKEY: Pubkey = pubkey!("21111111111111111111111111111111111111111111"); - } const NO_PASSPHRASE: &str = ""; @@ -885,4 +884,3 @@ fn do_main(matches: &ArgMatches) -> Result<(), Box> { Ok(()) } - diff --git a/net-utils/src/lib.rs b/net-utils/src/lib.rs index a661698e6baa80..712dec364cf133 100644 --- a/net-utils/src/lib.rs +++ b/net-utils/src/lib.rs @@ -577,4 +577,3 @@ pub fn find_available_port_in_range(ip_addr: IpAddr, range: PortRange) -> io::Re tries_left -= 1; } } - diff --git a/perf/src/lib.rs b/perf/src/lib.rs index efa2e191fc3d9f..701b7938d50323 100644 --- a/perf/src/lib.rs +++ b/perf/src/lib.rs @@ -16,7 +16,6 @@ extern crate lazy_static; #[macro_use] extern crate log; - #[macro_use] extern crate solana_metrics; diff --git a/poh/src/lib.rs b/poh/src/lib.rs index a052900081c2c8..491229af7f77d7 100644 --- a/poh/src/lib.rs +++ b/poh/src/lib.rs @@ -5,4 +5,3 @@ pub mod poh_service; #[macro_use] extern crate solana_metrics; - diff --git a/programs/bpf_loader/src/lib.rs b/programs/bpf_loader/src/lib.rs index a836a043a28c54..44d4c9f3fe170b 100644 --- a/programs/bpf_loader/src/lib.rs +++ b/programs/bpf_loader/src/lib.rs @@ -1635,4 +1635,3 @@ fn execute<'a, 'b: 'a>( execute_or_deserialize_result } - diff --git a/programs/loader-v3/src/lib.rs b/programs/loader-v3/src/lib.rs index 6b6f9195dc55c5..18b72e8cf78ce3 100644 --- a/programs/loader-v3/src/lib.rs +++ b/programs/loader-v3/src/lib.rs @@ -617,4 +617,3 @@ pub fn process_instruction_inner( } .map(|_| 0) } - diff --git a/programs/sbf/rust/128bit/src/lib.rs b/programs/sbf/rust/128bit/src/lib.rs index e4de7fddd23954..a161f3071b33e4 100644 --- a/programs/sbf/rust/128bit/src/lib.rs +++ b/programs/sbf/rust/128bit/src/lib.rs @@ -54,4 +54,3 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { custom_heap_default!(); custom_panic_default!(); - diff --git a/programs/sbf/rust/alloc/src/lib.rs b/programs/sbf/rust/alloc/src/lib.rs index 4ca8122df289fe..542f0d916cb680 100644 --- a/programs/sbf/rust/alloc/src/lib.rs +++ b/programs/sbf/rust/alloc/src/lib.rs @@ -78,4 +78,3 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { custom_heap_default!(); custom_panic_default!(); - diff --git a/programs/sbf/rust/dep_crate/src/lib.rs b/programs/sbf/rust/dep_crate/src/lib.rs index 07bde4c98ed1c7..feaad345c9c06f 100644 --- a/programs/sbf/rust/dep_crate/src/lib.rs +++ b/programs/sbf/rust/dep_crate/src/lib.rs @@ -18,4 +18,3 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { SUCCESS } - diff --git a/programs/sbf/rust/deprecated_loader/src/lib.rs b/programs/sbf/rust/deprecated_loader/src/lib.rs index 947511c8bad263..cac6a549cea8b5 100644 --- a/programs/sbf/rust/deprecated_loader/src/lib.rs +++ b/programs/sbf/rust/deprecated_loader/src/lib.rs @@ -71,4 +71,3 @@ fn process_instruction( Ok(()) } - diff --git a/programs/sbf/rust/iter/src/lib.rs b/programs/sbf/rust/iter/src/lib.rs index 5b383daa510deb..4c27810799cfeb 100644 --- a/programs/sbf/rust/iter/src/lib.rs +++ b/programs/sbf/rust/iter/src/lib.rs @@ -24,4 +24,3 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { custom_heap_default!(); custom_panic_default!(); - diff --git a/programs/sbf/rust/many_args/src/lib.rs b/programs/sbf/rust/many_args/src/lib.rs index 8ac62e36167444..909a6574c2db3b 100644 --- a/programs/sbf/rust/many_args/src/lib.rs +++ b/programs/sbf/rust/many_args/src/lib.rs @@ -28,4 +28,3 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { custom_heap_default!(); custom_panic_default!(); - diff --git a/programs/sbf/rust/many_args_dep/src/lib.rs b/programs/sbf/rust/many_args_dep/src/lib.rs index 83a3ec51fb660e..e739d677efbd36 100644 --- a/programs/sbf/rust/many_args_dep/src/lib.rs +++ b/programs/sbf/rust/many_args_dep/src/lib.rs @@ -49,4 +49,3 @@ pub fn many_args_sret( group3: u128::from(arg7) + u128::from(arg8) + u128::from(arg9), } } - diff --git a/programs/sbf/rust/param_passing/src/lib.rs b/programs/sbf/rust/param_passing/src/lib.rs index daffb115fe6bfb..d368a5d4bb2e6d 100644 --- a/programs/sbf/rust/param_passing/src/lib.rs +++ b/programs/sbf/rust/param_passing/src/lib.rs @@ -29,4 +29,3 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { custom_heap_default!(); custom_panic_default!(); - diff --git a/programs/sbf/rust/param_passing_dep/src/lib.rs b/programs/sbf/rust/param_passing_dep/src/lib.rs index 97f88a935cfea4..b2d1132c085427 100644 --- a/programs/sbf/rust/param_passing_dep/src/lib.rs +++ b/programs/sbf/rust/param_passing_dep/src/lib.rs @@ -25,4 +25,3 @@ impl<'a> TestDep { } } } - diff --git a/programs/sbf/rust/sanity/src/lib.rs b/programs/sbf/rust/sanity/src/lib.rs index 17b8bdb78fc7c6..bfd7349219fe18 100644 --- a/programs/sbf/rust/sanity/src/lib.rs +++ b/programs/sbf/rust/sanity/src/lib.rs @@ -77,4 +77,3 @@ pub fn process_instruction( sol_log_compute_units(); Ok(()) } - diff --git a/programs/sbf/rust/sha/src/lib.rs b/programs/sbf/rust/sha/src/lib.rs index ac86fc9fec717e..6d1289d56e5225 100644 --- a/programs/sbf/rust/sha/src/lib.rs +++ b/programs/sbf/rust/sha/src/lib.rs @@ -41,4 +41,3 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { custom_heap_default!(); custom_panic_default!(); - diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index a942a65ebb61af..ad3bb03ef436ba 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -22,6 +22,5 @@ extern crate log; #[macro_use] extern crate serde_derive; - #[macro_use] extern crate solana_metrics; diff --git a/runtime/store-tool/src/main.rs b/runtime/store-tool/src/main.rs index 7c8dda8349dcb2..301ae7fa641a3e 100644 --- a/runtime/store-tool/src/main.rs +++ b/runtime/store-tool/src/main.rs @@ -67,4 +67,3 @@ fn is_account_zeroed(account: &StoredAccountMeta) -> bool { && account.pubkey() == &Pubkey::default() && account.clone_account() == AccountSharedData::default() } - diff --git a/sdk/program/src/lib.rs b/sdk/program/src/lib.rs index 97ae6860eba749..60732184c77e11 100644 --- a/sdk/program/src/lib.rs +++ b/sdk/program/src/lib.rs @@ -755,4 +755,3 @@ macro_rules! unchecked_div_by_const { // `solana_sdk`. #[cfg(not(target_os = "solana"))] pub mod example_mocks; - diff --git a/sdk/src/compute_budget.rs b/sdk/src/compute_budget.rs index 6cbbe8d6c88027..1201390355ef22 100644 --- a/sdk/src/compute_budget.rs +++ b/sdk/src/compute_budget.rs @@ -63,7 +63,7 @@ impl ComputeBudgetInstruction { /// Serialize Instruction using borsh, this is only used in runtime::cost_model::tests but compilation /// can't be restricted as it's used across packages - // #[rustfmt::skip] + // #[cfg(rustfmt_escaped_skip)] pub fn pack(self) -> Result, std::io::Error> { self.try_to_vec() } diff --git a/sdk/src/lib.rs b/sdk/src/lib.rs index 2676a70c19de38..1a5e925dfc2c22 100644 --- a/sdk/src/lib.rs +++ b/sdk/src/lib.rs @@ -171,4 +171,3 @@ extern crate log as logger; #[macro_use] extern crate solana_frozen_abi_macro; - diff --git a/storage-bigtable/src/lib.rs b/storage-bigtable/src/lib.rs index cf262d41092782..10ae373bdaadcb 100644 --- a/storage-bigtable/src/lib.rs +++ b/storage-bigtable/src/lib.rs @@ -122,7 +122,6 @@ struct StoredConfirmedBlock { block_height: Option, } - impl From for ConfirmedBlock { fn from(confirmed_block: StoredConfirmedBlock) -> Self { let StoredConfirmedBlock { @@ -153,7 +152,6 @@ struct StoredConfirmedBlockTransaction { meta: Option, } - impl From for TransactionWithStatusMeta { fn from(tx_with_meta: StoredConfirmedBlockTransaction) -> Self { let StoredConfirmedBlockTransaction { transaction, meta } = tx_with_meta; @@ -1033,4 +1031,3 @@ impl LedgerStorage { Ok(()) } } - diff --git a/transaction-dos/src/main.rs b/transaction-dos/src/main.rs index d29156e90bdc16..59d338083f1172 100644 --- a/transaction-dos/src/main.rs +++ b/transaction-dos/src/main.rs @@ -630,4 +630,3 @@ fn main() { batch_sleep_ms, ); } - diff --git a/transaction-status/src/lib.rs b/transaction-status/src/lib.rs index b3af4119c8ce0a..7637ee60e1c7cc 100644 --- a/transaction-status/src/lib.rs +++ b/transaction-status/src/lib.rs @@ -1320,4 +1320,3 @@ impl From for UiTransactionReturnData { pub enum UiReturnDataEncoding { Base64, } - diff --git a/version/src/lib.rs b/version/src/lib.rs index a134f89facf4dd..5f012fcadbb519 100644 --- a/version/src/lib.rs +++ b/version/src/lib.rs @@ -129,4 +129,3 @@ macro_rules! version { &*format!("{:?}", $crate::Version::default()) }; } -