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

@@ -1,17 +1,20 @@
//! The `packet` module defines data structures and methods to pull data from the network.
use crate::{
recvmmsg::{recv_mmsg, NUM_RCVMMSGS},
socket::SocketAddrSpace,
use {
crate::{
recvmmsg::{recv_mmsg, NUM_RCVMMSGS},
socket::SocketAddrSpace,
},
solana_metrics::inc_new_counter_debug,
std::{io::Result, net::UdpSocket, time::Instant},
};
pub use solana_perf::packet::{
limited_deserialize, to_packets_chunked, Packets, PacketsRecycler, NUM_PACKETS,
PACKETS_PER_BATCH,
pub use {
solana_perf::packet::{
limited_deserialize, to_packets_chunked, Packets, PacketsRecycler, NUM_PACKETS,
PACKETS_PER_BATCH,
},
solana_sdk::packet::{Meta, Packet, PACKET_DATA_SIZE},
};
use solana_metrics::inc_new_counter_debug;
pub use solana_sdk::packet::{Meta, Packet, PACKET_DATA_SIZE};
use std::{io::Result, net::UdpSocket, time::Instant};
pub fn recv_from(obj: &mut Packets, socket: &UdpSocket, max_wait_ms: u64) -> Result<usize> {
let mut i = 0;
//DOCUMENTED SIDE-EFFECT
@@ -73,10 +76,14 @@ pub fn send_to(
#[cfg(test)]
mod tests {
use super::*;
use std::io;
use std::io::Write;
use std::net::{SocketAddr, UdpSocket};
use {
super::*,
std::{
io,
io::Write,
net::{SocketAddr, UdpSocket},
},
};
#[test]
fn test_packets_set_addr() {