File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -344,6 +344,9 @@ impl hash::Hash for SocketAddrV6 {
344
344
/// some other type (e.g. a string) just for it to be converted back to
345
345
/// `SocketAddr` in constructor methods is pointless.
346
346
///
347
+ /// Addresses returned by the operating system that are not IP addresses are
348
+ /// silently ignored.
349
+ ///
347
350
/// Some examples:
348
351
///
349
352
/// ```no_run
Original file line number Diff line number Diff line change @@ -107,6 +107,9 @@ impl Iterator for LookupHost {
107
107
/// This method may perform a DNS query to resolve `host` and may also inspect
108
108
/// system configuration to resolve the specified hostname.
109
109
///
110
+ /// The returned iterator will skip over any unknown addresses returned by the
111
+ /// operating system.
112
+ ///
110
113
/// # Examples
111
114
///
112
115
/// ```no_run
@@ -116,7 +119,7 @@ impl Iterator for LookupHost {
116
119
///
117
120
/// # fn foo() -> std::io::Result<()> {
118
121
/// for host in try!(net::lookup_host("rust-lang.org")) {
119
- /// println!("found address: {}", try!( host) );
122
+ /// println!("found address: {}", host);
120
123
/// }
121
124
/// # Ok(())
122
125
/// # }
You can’t perform that action at this time.
0 commit comments