@@ -527,7 +527,7 @@ impl Ipv4Addr {
527527 /// ```
528528 /// use std::net::Ipv4Addr;
529529 ///
530- /// let addr = Ipv4Addr::from (0x12345678);
530+ /// let addr = Ipv4Addr::from_bits (0x12345678);
531531 /// assert_eq!(Ipv4Addr::new(0x12, 0x34, 0x56, 0x78), addr);
532532 /// ```
533533 #[ rustc_const_stable( feature = "ip_bits" , since = "1.80.0" ) ]
@@ -1294,7 +1294,7 @@ impl Ipv6Addr {
12941294 /// 0x1020, 0x3040, 0x5060, 0x7080,
12951295 /// 0x90A0, 0xB0C0, 0xD0E0, 0xF00D,
12961296 /// );
1297- /// assert_eq!(0x102030405060708090A0B0C0D0E0F00D_u128, u128::from( addr));
1297+ /// assert_eq!(0x102030405060708090A0B0C0D0E0F00D_u128, addr.to_bits( ));
12981298 /// ```
12991299 ///
13001300 /// ```
@@ -1330,7 +1330,7 @@ impl Ipv6Addr {
13301330 /// ```
13311331 /// use std::net::Ipv6Addr;
13321332 ///
1333- /// let addr = Ipv6Addr::from (0x102030405060708090A0B0C0D0E0F00D_u128);
1333+ /// let addr = Ipv6Addr::from_bits (0x102030405060708090A0B0C0D0E0F00D_u128);
13341334 /// assert_eq!(
13351335 /// Ipv6Addr::new(
13361336 /// 0x1020, 0x3040, 0x5060, 0x7080,
0 commit comments