Deprecate std::net::lookup_host
We intended to do this quite a while ago but it snuck through.
This commit is contained in:
@@ -12,7 +12,9 @@ use fmt;
|
||||
use hash;
|
||||
use io;
|
||||
use mem;
|
||||
use net::{lookup_host, ntoh, hton, IpAddr, Ipv4Addr, Ipv6Addr};
|
||||
use net::{ntoh, hton, IpAddr, Ipv4Addr, Ipv6Addr};
|
||||
#[allow(deprecated)]
|
||||
use net::lookup_host;
|
||||
use option;
|
||||
use sys::net::netc as c;
|
||||
use sys_common::{FromInner, AsInner, IntoInner};
|
||||
@@ -845,6 +847,7 @@ impl ToSocketAddrs for (Ipv6Addr, u16) {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
fn resolve_socket_addr(s: &str, p: u16) -> io::Result<vec::IntoIter<SocketAddr>> {
|
||||
let ips = lookup_host(s)?;
|
||||
let v: Vec<_> = ips.map(|mut a| { a.set_port(p); a }).collect();
|
||||
|
||||
Reference in New Issue
Block a user