From 7b71a331c604e8f77cb7d58ef7bffd216bbc03a7 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Thu, 9 Apr 2020 14:07:11 -0700 Subject: [PATCH] clippy --- net-utils/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net-utils/src/lib.rs b/net-utils/src/lib.rs index 7f6d6d8dea..6ed03f71d6 100644 --- a/net-utils/src/lib.rs +++ b/net-utils/src/lib.rs @@ -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)> { @@ -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