about summary refs log tree commit diff
path: root/src/libstd/net/ip.rs
diff options
context:
space:
mode:
authorlukaramu <lukaramu@gmail.com>2017-03-27 16:38:17 +0200
committerlukaramu <lukaramu@gmail.com>2017-03-27 16:38:17 +0200
commitb8cbc5d46af4b15bfeca324aa37d8c2ca054e58e (patch)
tree14caf1e7736195735b9b6d82f0c04e62e4fab515 /src/libstd/net/ip.rs
parentc2601fd358769cbecae479e8d32521f6e5d5c633 (diff)
downloadrust-b8cbc5d46af4b15bfeca324aa37d8c2ca054e58e.tar.gz
rust-b8cbc5d46af4b15bfeca324aa37d8c2ca054e58e.zip
Addressed requested changes for PR #40838
* Fixed spelling ToSocketAddr -> ToSocketAddrs in module docs
  (which also fixes a link)
* Added missing "when" before "interacting" in module docs
* Changed SocketAddr's top-level docs to explicitly state what socket
  addresses consist of, making them more consistent with SocketAddrV4's
  and SocketAddrV6's docs
* Changed "in C" -> "in C's `netinet/in.h`"
* Changed wording in is_ipv4/is_ipv6 methods to ", `false` otherwise"
* Add missing closing ` ``` ` in Ipv6Addr's examples
* Removed "Errors" section in ToSocketAddrs' to_socket_addrs method as it
  was rather redundant
Diffstat (limited to 'src/libstd/net/ip.rs')
-rw-r--r--src/libstd/net/ip.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs
index 2a1f959b35d..c46fe4a58c7 100644
--- a/src/libstd/net/ip.rs
+++ b/src/libstd/net/ip.rs
@@ -114,6 +114,7 @@ pub struct Ipv4Addr {
 /// let localhost = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1);
 /// assert_eq!("::1".parse(), Ok(localhost));
 /// assert_eq!(localhost.is_loopback(), true);
+/// ```
 #[derive(Copy)]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct Ipv6Addr {
@@ -266,13 +267,11 @@ impl IpAddr {
         }
     }
 
-    /// Returns [`true`] if this address is an [IPv4 address] and [`false`] if it's an
-    /// [IPv6 address].
+    /// Returns [`true`] if this address is an [IPv4 address], and [`false`] otherwise.
     ///
     /// [`true`]: ../../std/primitive.bool.html
     /// [`false`]: ../../std/primitive.bool.html
     /// [IPv4 address]: #variant.V4
-    /// [IPv6 address]: #variant.V6
     ///
     /// # Examples
     ///
@@ -293,12 +292,10 @@ impl IpAddr {
         }
     }
 
-    /// Returns [`true`] if this address is an [IPv6 address] and [`false`] if it's an
-    /// [IPv4 address].
+    /// Returns [`true`] if this address is an [IPv6 address], and [`false`] otherwise.
     ///
     /// [`true`]: ../../std/primitive.bool.html
     /// [`false`]: ../../std/primitive.bool.html
-    /// [IPv4 address]: #variant.V4
     /// [IPv6 address]: #variant.V6
     ///
     /// # Examples