Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Apr 10, 2020
1 parent 032127b commit 7b71a33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ pub fn bind_common_in_range(
}
}

return Err(io::Error::new(
Err(io::Error::new(
io::ErrorKind::Other,
format!("No available TCP/UDP ports in {:?}", range),
));
))
}

pub fn bind_in_range(ip_addr: IpAddr, range: PortRange) -> io::Result<(u16, UdpSocket)> {
Expand All @@ -285,10 +285,10 @@ pub fn bind_in_range(ip_addr: IpAddr, range: PortRange) -> io::Result<(u16, UdpS
}
}

return Err(io::Error::new(
Err(io::Error::new(
io::ErrorKind::Other,
format!("No available UDP ports in {:?}", range),
));
))
}

// binds many sockets to the same port in a range
Expand Down

0 comments on commit 7b71a33

Please sign in to comment.