Update documentation to reflect ignoring of unknown addresses

This commit is contained in:
Tobias Bucher 2016-06-29 11:44:33 +02:00
parent a03a82e5e0
commit 6aa0182520
2 changed files with 7 additions and 1 deletions

View File

@ -344,6 +344,9 @@ fn hash<H: hash::Hasher>(&self, s: &mut H) {
/// some other type (e.g. a string) just for it to be converted back to
/// `SocketAddr` in constructor methods is pointless.
///
/// Addresses returned by the operating system that are not IP addresses are
/// silently ignored.
///
/// Some examples:
///
/// ```no_run

View File

@ -107,6 +107,9 @@ fn next(&mut self) -> Option<SocketAddr> { self.0.next() }
/// 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
@ -116,7 +119,7 @@ fn next(&mut self) -> Option<SocketAddr> { self.0.next() }
///
/// # fn foo() -> std::io::Result<()> {
/// for host in try!(net::lookup_host("rust-lang.org")) {
/// println!("found address: {}", try!(host));
/// println!("found address: {}", host);
/// }
/// # Ok(())
/// # }