config: use abstracted associated type
This commit is contained in:
1 parent
b2739c5e12
commit
fab0f47835
1 file changed
+1
-1
+1
-1
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user