Skip to content

Commit

Permalink
Update documentation to reflect ignoring of unknown addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
tbu- committed Jun 29, 2016
1 parent a03a82e commit 6aa0182
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/libstd/net/addr.rs
Expand Up @@ -344,6 +344,9 @@ impl hash::Hash for SocketAddrV6 {
/// 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
Expand Down
5 changes: 4 additions & 1 deletion src/libstd/net/mod.rs
Expand Up @@ -107,6 +107,9 @@ impl Iterator for LookupHost {
/// 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
Expand All @@ -116,7 +119,7 @@ impl Iterator for LookupHost {
///
/// # 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(())
/// # }
Expand Down

0 comments on commit 6aa0182

Please sign in to comment.