aboutsummaryrefslogtreecommitdiff
path: root/ctr-std/src/net
diff options
context:
space:
mode:
authorFenrirWolf <[email protected]>2018-06-10 11:49:19 -0600
committerGitHub <[email protected]>2018-06-10 11:49:19 -0600
commit49041a4e56a4cab33ae7889537d33670e8b012fb (patch)
tree0c931e8716200f9aa8c7daef47b62474d0285d5c /ctr-std/src/net
parentMerge pull request #69 from FenrirWolf/libctru-1.5.0 (diff)
parentFixes according to Fenrir's review (diff)
downloadctru-rs-49041a4e56a4cab33ae7889537d33670e8b012fb.tar.xz
ctru-rs-49041a4e56a4cab33ae7889537d33670e8b012fb.zip
Merge pull request #68 from linouxis9/master
Update for latest nightly 2018-05-06
Diffstat (limited to 'ctr-std/src/net')
-rw-r--r--ctr-std/src/net/addr.rs4
-rw-r--r--ctr-std/src/net/mod.rs65
2 files changed, 1 insertions, 68 deletions
diff --git a/ctr-std/src/net/addr.rs b/ctr-std/src/net/addr.rs
index bc2c9f5..e80c3ee 100644
--- a/ctr-std/src/net/addr.rs
+++ b/ctr-std/src/net/addr.rs
@@ -13,11 +13,10 @@ use hash;
use io;
use mem;
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};
+use sys_common::net::lookup_host;
use vec;
use iter;
use slice;
@@ -856,7 +855,6 @@ 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();
diff --git a/ctr-std/src/net/mod.rs b/ctr-std/src/net/mod.rs
index b0d5e56..be4bcee 100644
--- a/ctr-std/src/net/mod.rs
+++ b/ctr-std/src/net/mod.rs
@@ -38,9 +38,7 @@
#![stable(feature = "rust1", since = "1.0.0")]
-use fmt;
use io::{self, Error, ErrorKind};
-use sys_common::net as net_imp;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::ip::{IpAddr, Ipv4Addr, Ipv6Addr, Ipv6MulticastScope};
@@ -128,66 +126,3 @@ fn each_addr<A: ToSocketAddrs, F, T>(addr: A, mut f: F) -> io::Result<T>
"could not resolve to any addresses")
}))
}
-
-/// An iterator over `SocketAddr` values returned from a host lookup operation.
-#[unstable(feature = "lookup_host", reason = "unsure about the returned \
- iterator and returning socket \
- addresses",
- issue = "27705")]
-#[rustc_deprecated(since = "1.25.0", reason = "Use the ToSocketAddrs trait instead")]
-pub struct LookupHost(net_imp::LookupHost);
-
-#[unstable(feature = "lookup_host", reason = "unsure about the returned \
- iterator and returning socket \
- addresses",
- issue = "27705")]
-#[rustc_deprecated(since = "1.25.0", reason = "Use the ToSocketAddrs trait instead")]
-#[allow(deprecated)]
-impl Iterator for LookupHost {
- type Item = SocketAddr;
- fn next(&mut self) -> Option<SocketAddr> { self.0.next() }
-}
-
-#[unstable(feature = "lookup_host", reason = "unsure about the returned \
- iterator and returning socket \
- addresses",
- issue = "27705")]
-#[rustc_deprecated(since = "1.25.0", reason = "Use the ToSocketAddrs trait instead")]
-#[allow(deprecated)]
-impl fmt::Debug for LookupHost {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.pad("LookupHost { .. }")
- }
-}
-
-/// Resolve the host specified by `host` as a number of `SocketAddr` instances.
-///
-/// This method may perform a DNS query to resolve `host` and may also inspect
-/// system configuration to resolve the specified hostname.
-///
-/// The returned iterator will skip over any unknown addresses returned by the
-/// operating system.
-///
-/// # Examples
-///
-/// ```no_run
-/// #![feature(lookup_host)]
-///
-/// use std::net;
-///
-/// fn main() -> std::io::Result<()> {
-/// for host in net::lookup_host("rust-lang.org")? {
-/// println!("found address: {}", host);
-/// }
-/// Ok(())
-/// }
-/// ```
-#[unstable(feature = "lookup_host", reason = "unsure about the returned \
- iterator and returning socket \
- addresses",
- issue = "27705")]
-#[rustc_deprecated(since = "1.25.0", reason = "Use the ToSocketAddrs trait instead")]
-#[allow(deprecated)]
-pub fn lookup_host(host: &str) -> io::Result<LookupHost> {
- net_imp::lookup_host(host).map(LookupHost)
-}