]> git.lizzy.rs Git - rust.git/commitdiff
Close doc examples and trim whitespace.
authorJ. Cliff Dyer <jcd@sdf.org>
Thu, 7 Sep 2017 23:06:57 +0000 (19:06 -0400)
committerJ. Cliff Dyer <jcd@sdf.org>
Thu, 7 Sep 2017 23:06:57 +0000 (19:06 -0400)
src/libstd/net/ip.rs

index d6387fdd659a8003aacaa429b0daf1fbadecc756..a3775d30aa8b218c29e31636b487181fa13609bc 100644 (file)
@@ -351,6 +351,7 @@ pub fn new(a: u8, b: u8, c: u8, d: u8) -> Ipv4Addr {
     ///
     /// let addr = Ipv4Addr::localhost();
     /// assert_eq!(addr, Ipv4Addr::new(127, 0, 0, 1));
+    /// ```
     pub fn localhost() -> Ipv4Addr {
         Ipv4Addr::new(127, 0, 0, 1)
     }
@@ -364,6 +365,7 @@ pub fn localhost() -> Ipv4Addr {
     ///
     /// let addr = Ipv4Addr::unspecified();
     /// assert_eq!(addr, Ipv4Addr::new(0, 0, 0, 0));
+    /// ```
     pub fn unspecified() -> Ipv4Addr {
         Ipv4Addr::new(0, 0, 0, 0)
     }
@@ -823,6 +825,7 @@ pub fn new(a: u16, b: u16, c: u16, d: u16, e: u16, f: u16, g: u16,
     ///
     /// let addr = Ipv6Addr::localhost();
     /// assert_eq!(addr, Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1));
+    /// ```
     pub fn localhost() -> Ipv6Addr {
         Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1)
     }
@@ -836,6 +839,7 @@ pub fn localhost() -> Ipv6Addr {
     ///
     /// let addr = Ipv6Addr::unspecified();
     /// assert_eq!(addr, Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0));
+    /// ```
     pub fn unspecified() -> Ipv6Addr {
         Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0)
     }
@@ -1748,7 +1752,7 @@ fn ipv6_from_contructors() {
         assert_eq!(Ipv6Addr::unspecified(), Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0));
         assert!(Ipv6Addr::unspecified().is_unspecified());
     }
-        
+
     #[test]
     fn ipv4_from_octets() {
         assert_eq!(Ipv4Addr::from([127, 0, 0, 1]), Ipv4Addr::new(127, 0, 0, 1))