@@ -527,7 +527,7 @@ impl Ipv4Addr {
527
527
/// ```
528
528
/// use std::net::Ipv4Addr;
529
529
///
530
- /// let addr = Ipv4Addr::from (0x12345678);
530
+ /// let addr = Ipv4Addr::from_bits (0x12345678);
531
531
/// assert_eq!(Ipv4Addr::new(0x12, 0x34, 0x56, 0x78), addr);
532
532
/// ```
533
533
#[ rustc_const_stable( feature = "ip_bits" , since = "1.80.0" ) ]
@@ -1294,7 +1294,7 @@ impl Ipv6Addr {
1294
1294
/// 0x1020, 0x3040, 0x5060, 0x7080,
1295
1295
/// 0x90A0, 0xB0C0, 0xD0E0, 0xF00D,
1296
1296
/// );
1297
- /// assert_eq!(0x102030405060708090A0B0C0D0E0F00D_u128, u128::from( addr));
1297
+ /// assert_eq!(0x102030405060708090A0B0C0D0E0F00D_u128, addr.to_bits( ));
1298
1298
/// ```
1299
1299
///
1300
1300
/// ```
@@ -1330,7 +1330,7 @@ impl Ipv6Addr {
1330
1330
/// ```
1331
1331
/// use std::net::Ipv6Addr;
1332
1332
///
1333
- /// let addr = Ipv6Addr::from (0x102030405060708090A0B0C0D0E0F00D_u128);
1333
+ /// let addr = Ipv6Addr::from_bits (0x102030405060708090A0B0C0D0E0F00D_u128);
1334
1334
/// assert_eq!(
1335
1335
/// Ipv6Addr::new(
1336
1336
/// 0x1020, 0x3040, 0x5060, 0x7080,
0 commit comments