clippy --fix
This commit is contained in:
@@ -242,10 +242,8 @@ pub fn compatible_unspecified_socket_addr(socket_addr: &SocketAddr) -> SocketAdd
|
||||
pub fn listen_address_to_socket_addrs(listen_address: &str) -> Result<Vec<SocketAddr>, String> {
|
||||
// If no address is specified, but the port is, use ipv4 and ipv6 unspecified
|
||||
// If the address is specified, only use the specified port and fail otherwise
|
||||
let ip_addrs = vec![
|
||||
IpAddr::V4(Ipv4Addr::UNSPECIFIED),
|
||||
IpAddr::V6(Ipv6Addr::UNSPECIFIED),
|
||||
];
|
||||
let ip_addrs = [IpAddr::V4(Ipv4Addr::UNSPECIFIED),
|
||||
IpAddr::V6(Ipv6Addr::UNSPECIFIED)];
|
||||
|
||||
Ok(if let Some(portstr) = listen_address.strip_prefix(':') {
|
||||
let port = portstr
|
||||
@@ -354,7 +352,7 @@ pub unsafe fn unaligned_u8_vec_uninit(n_bytes: usize) -> Vec<u8> {
|
||||
let ptr = unaligned.as_mut_ptr();
|
||||
mem::forget(unaligned);
|
||||
|
||||
Vec::from_raw_parts(ptr as *mut u8, n_bytes, n_bytes)
|
||||
Vec::from_raw_parts(ptr, n_bytes, n_bytes)
|
||||
}
|
||||
|
||||
pub fn debug_backtrace() -> String {
|
||||
|
||||
Reference in New Issue
Block a user