We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adaa684 commit 1636910Copy full SHA for 1636910
tokio/src/net/addr.rs
@@ -121,6 +121,20 @@ impl sealed::ToSocketAddrsPriv for (Ipv6Addr, u16) {
121
}
122
123
124
+// ===== impl &[SocketAddr] =====
125
+
126
+impl ToSocketAddrs for &[SocketAddr] {}
127
128
+impl sealed::ToSocketAddrsPriv for &[SocketAddr] {
129
+ type Iter = std::vec::IntoIter<SocketAddr>;
130
+ type Future = ReadyFuture<Self::Iter>;
131
132
+ fn to_socket_addrs(&self) -> Self::Future {
133
+ let iter = self.to_vec().into_iter();
134
+ future::ok(iter)
135
+ }
136
+}
137
138
cfg_dns! {
139
// ===== impl str =====
140
0 commit comments