Skip to content

Commit ad170f2

Browse files
committed
Close doc examples and trim whitespace.
1 parent c22db3d commit ad170f2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libstd/net/ip.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ impl Ipv4Addr {
351351
///
352352
/// let addr = Ipv4Addr::localhost();
353353
/// assert_eq!(addr, Ipv4Addr::new(127, 0, 0, 1));
354+
/// ```
354355
pub fn localhost() -> Ipv4Addr {
355356
Ipv4Addr::new(127, 0, 0, 1)
356357
}
@@ -364,6 +365,7 @@ impl Ipv4Addr {
364365
///
365366
/// let addr = Ipv4Addr::unspecified();
366367
/// assert_eq!(addr, Ipv4Addr::new(0, 0, 0, 0));
368+
/// ```
367369
pub fn unspecified() -> Ipv4Addr {
368370
Ipv4Addr::new(0, 0, 0, 0)
369371
}
@@ -823,6 +825,7 @@ impl Ipv6Addr {
823825
///
824826
/// let addr = Ipv6Addr::localhost();
825827
/// assert_eq!(addr, Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1));
828+
/// ```
826829
pub fn localhost() -> Ipv6Addr {
827830
Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1)
828831
}
@@ -836,6 +839,7 @@ impl Ipv6Addr {
836839
///
837840
/// let addr = Ipv6Addr::unspecified();
838841
/// assert_eq!(addr, Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0));
842+
/// ```
839843
pub fn unspecified() -> Ipv6Addr {
840844
Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0)
841845
}
@@ -1748,7 +1752,7 @@ mod tests {
17481752
assert_eq!(Ipv6Addr::unspecified(), Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0));
17491753
assert!(Ipv6Addr::unspecified().is_unspecified());
17501754
}
1751-
1755+
17521756
#[test]
17531757
fn ipv4_from_octets() {
17541758
assert_eq!(Ipv4Addr::from([127, 0, 0, 1]), Ipv4Addr::new(127, 0, 0, 1))

0 commit comments

Comments
 (0)