diff options
| author | Nick Hamann <nick@wabbo.org> | 2015-04-29 16:24:44 -0500 |
|---|---|---|
| committer | Nick Hamann <nick@wabbo.org> | 2015-04-29 16:24:44 -0500 |
| commit | 2baeabddd98d38497780bcc2271b71ee693680df (patch) | |
| tree | 3c5229d9de32f44f2c95641838bb162c327d5298 /src/libstd/net | |
| parent | a237ceb030700792cd2e0895a0839bbf5e7b60a4 (diff) | |
| download | rust-2baeabddd98d38497780bcc2271b71ee693680df.tar.gz rust-2baeabddd98d38497780bcc2271b71ee693680df.zip | |
Improve libstd/net/addr.rs documentation.
This adds some missing punctuation and converts uses of "Gets" to "Returns". This sounds better to my ear, but more importantly is more consistent with the documentation from other files.
Diffstat (limited to 'src/libstd/net')
| -rw-r--r-- | src/libstd/net/addr.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libstd/net/addr.rs b/src/libstd/net/addr.rs index 2e34e46726f..b0bf9d0f806 100644 --- a/src/libstd/net/addr.rs +++ b/src/libstd/net/addr.rs @@ -41,7 +41,7 @@ pub enum SocketAddr { #[stable(feature = "rust1", since = "1.0.0")] pub struct SocketAddrV4 { inner: libc::sockaddr_in } -/// An IPv6 socket address +/// An IPv6 socket address. #[derive(Copy)] #[stable(feature = "rust1", since = "1.0.0")] pub struct SocketAddrV6 { inner: libc::sockaddr_in6 } @@ -56,7 +56,7 @@ impl SocketAddr { } } - /// Gets the IP address associated with this socket address. + /// Returns the IP address associated with this socket address. #[unstable(feature = "ip_addr", reason = "recent addition")] pub fn ip(&self) -> IpAddr { match *self { @@ -65,7 +65,7 @@ impl SocketAddr { } } - /// Gets the port number associated with this socket address + /// Returns the port number associated with this socket address. #[stable(feature = "rust1", since = "1.0.0")] pub fn port(&self) -> u16 { match *self { @@ -89,7 +89,7 @@ impl SocketAddrV4 { } } - /// Gets the IP address associated with this socket address. + /// Returns the IP address associated with this socket address. #[stable(feature = "rust1", since = "1.0.0")] pub fn ip(&self) -> &Ipv4Addr { unsafe { @@ -97,7 +97,7 @@ impl SocketAddrV4 { } } - /// Gets the port number associated with this socket address + /// Returns the port number associated with this socket address. #[stable(feature = "rust1", since = "1.0.0")] pub fn port(&self) -> u16 { ntoh(self.inner.sin_port) } } @@ -120,7 +120,7 @@ impl SocketAddrV6 { } } - /// Gets the IP address associated with this socket address. + /// Returns the IP address associated with this socket address. #[stable(feature = "rust1", since = "1.0.0")] pub fn ip(&self) -> &Ipv6Addr { unsafe { @@ -128,16 +128,16 @@ impl SocketAddrV6 { } } - /// Gets the port number associated with this socket address + /// Returns the port number associated with this socket address. #[stable(feature = "rust1", since = "1.0.0")] pub fn port(&self) -> u16 { ntoh(self.inner.sin6_port) } - /// Gets scope ID associated with this address, corresponding to the + /// Returns scope ID associated with this address, corresponding to the /// `sin6_flowinfo` field in C. #[stable(feature = "rust1", since = "1.0.0")] pub fn flowinfo(&self) -> u32 { ntoh(self.inner.sin6_flowinfo) } - /// Gets scope ID associated with this address, corresponding to the + /// Returns scope ID associated with this address, corresponding to the /// `sin6_scope_id` field in C. #[stable(feature = "rust1", since = "1.0.0")] pub fn scope_id(&self) -> u32 { ntoh(self.inner.sin6_scope_id) } |
