File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,8 @@ pub struct Ipv4Addr {
138
138
///
139
139
/// To convert from an IPv4 address to an IPv4-mapped IPv6 address, use [`Ipv4Addr::to_ipv6_mapped`].
140
140
/// Use [`Ipv6Addr::to_ipv4`] to convert an IPv4-mapped IPv6 address to the canonical IPv4 address.
141
- /// Note that this will also convert the IPv6 loopback address `::1` to `0.0.0.1`.
141
+ /// Note that this will also convert the IPv6 loopback address `::1` to `0.0.0.1`. Use
142
+ /// [`Ipv6Addr::to_ipv4_mapped`] to avoid this.
142
143
///
143
144
/// [IETF RFC 4291 Section 2.5.5.2]: https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.5.2
144
145
///
@@ -1672,7 +1673,8 @@ impl Ipv6Addr {
1672
1673
/// or an [IPv4-mapped] address as defined in [IETF RFC 4291 section 2.5.5.2],
1673
1674
/// otherwise returns [`None`].
1674
1675
///
1675
- /// Note that this will return an [`IPv4` address] for the IPv6 loopback address `::1`.
1676
+ /// Note that this will return an [`IPv4` address] for the IPv6 loopback address `::1`. Use
1677
+ /// [`Ipv6Addr::to_ipv4_mapped`] to avoid this.
1676
1678
///
1677
1679
/// `::a.b.c.d` and `::ffff:a.b.c.d` become `a.b.c.d`. `::1` becomes `0.0.0.1`.
1678
1680
/// All addresses *not* starting with either all zeroes or `::ffff` will return `None`.
You can’t perform that action at this time.
0 commit comments