Skip to content

Commit a3089ce

Browse files
committed
use constant Ipv4Addr::UNSPECIFIED as peer addr
1 parent a4a4954 commit a3089ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

forwarder/src/peer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ impl Peer {
5050

5151
pub fn create_any_addr(is_ipv6: bool) -> SocketAddr {
5252
if is_ipv6 {
53-
SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0), 0, 0, 0).into()
53+
SocketAddrV6::new(Ipv6Addr::UNSPECIFIED, 0, 0, 0).into()
5454
} else {
55-
SocketAddrV4::new(Ipv4Addr::new(0, 0, 0, 0), 0).into()
55+
SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 0).into()
5656
}
5757
}
5858

0 commit comments

Comments
 (0)