Skip to content

Commit

Permalink
run clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Stennsen committed Jul 6, 2024
1 parent 1843e19 commit 9f3c40a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub async fn udp_connect<A: ToSocketAddrs>(addr: A, prefer_ipv6: bool) -> Result
// Try to find an IPv6 address
match all_host_addresses.clone().iter().find(|x| x.is_ipv6()) {
Some(socket_addr_ipv6) => {
socket_addr = socket_addr_ipv6.clone();
socket_addr = *socket_addr_ipv6;
bind_addr = ":::0";
},
None => {
Expand All @@ -92,7 +92,7 @@ pub async fn udp_connect<A: ToSocketAddrs>(addr: A, prefer_ipv6: bool) -> Result
None => return Err(anyhow!("Failed to lookup the host")),
// fallback to IPv4
Some(socket_addr_ipv4) => {
socket_addr = socket_addr_ipv4.clone();
socket_addr = *socket_addr_ipv4;
bind_addr = "0.0.0.0:0";
}
}
Expand Down

0 comments on commit 9f3c40a

Please sign in to comment.