config: use abstracted associated type

This commit is contained in:
George Hilliard committed 2020-04-22 23:25:01 -05:00
1 parent b2739c5e12
commit fab0f47835
1 file changed
+1 -1
+1 -1
View File
@@ -40,7 +40,7 @@ impl fmt::Display for BindAddr {
}
impl ToSocketAddrs for BindAddr {
type Iter = std::vec::IntoIter<SocketAddr>;
type Iter = <(&'static str, u16) as ToSocketAddrs>::Iter;
fn to_socket_addrs(&self) -> std::io::Result<Self::Iter> {
let host = self.host.as_deref().unwrap_or("0.0.0.0");
(host, self.port).to_socket_addrs()