Fixing clippy

This commit is contained in:
Ryan Summers 2021-06-15 13:46:39 +02:00
parent 9e083842ee
commit 7294a69b66

View File

@ -46,13 +46,16 @@ impl Default for StreamTarget {
}
}
impl Into<SocketAddr> for StreamTarget {
fn into(self) -> SocketAddr {
impl From<StreamTarget> for SocketAddr {
fn from(target: StreamTarget) -> SocketAddr {
SocketAddr::new(
IpAddr::V4(Ipv4Addr::new(
self.ip[0], self.ip[1], self.ip[2], self.ip[3],
target.ip[0],
target.ip[1],
target.ip[2],
target.ip[3],
)),
self.port,
target.port,
)
}
}