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,5 +1,7 @@
use clap::{App, Arg};
use std::net::{SocketAddr, TcpListener};
use {
clap::{App, Arg},
std::net::{SocketAddr, TcpListener},
};
fn main() {
solana_logger::setup();

View File

@ -380,9 +380,13 @@ fn udp_socket(_reuseaddr: bool) -> io::Result<Socket> {
#[cfg(not(any(windows, target_os = "ios")))]
fn udp_socket(reuseaddr: bool) -> io::Result<Socket> {
use nix::sys::socket::setsockopt;
use nix::sys::socket::sockopt::{ReuseAddr, ReusePort};
use std::os::unix::io::AsRawFd;
use {
nix::sys::socket::{
setsockopt,
sockopt::{ReuseAddr, ReusePort},
},
std::os::unix::io::AsRawFd,
};
let sock = Socket::new(Domain::IPV4, Type::DGRAM, None)?;
let sock_fd = sock.as_raw_fd();
@ -524,8 +528,7 @@ pub fn find_available_port_in_range(ip_addr: IpAddr, range: PortRange) -> io::Re
#[cfg(test)]
mod tests {
use super::*;
use std::net::Ipv4Addr;
use {super::*, std::net::Ipv4Addr};
#[test]
fn test_response_length() {