use ipnet::IpNet;
use std::net::IpAddr;
fn main() {
assert!("ffff:ffff:ffff:ffff:ffff:ffff::ffff:ffff/114".parse::<IpNet>().is_ok());
assert!("ffff:ffff:ffff:ffff:ffff:ffff::ffff:ffff".parse::<IpAddr>().is_ok());
}
The second assertion fails while the first one holds. ffff:ffff:ffff:ffff:ffff:ffff::ffff:ffff contains 8 ffffs and 1 :: that represents at least one all-zero groups.
Consider the following program,
The second assertion fails while the first one holds.
ffff:ffff:ffff:ffff:ffff:ffff::ffff:ffff
contains 8ffff
s and 1::
that represents at least one all-zero groups.