fix for 0.0.0.0/0 network (#199)

This commit is contained in:
SildCave
2024-09-07 21:22:12 +02:00
committed by GitHub
parent cbf8d6b29a
commit ad46759a55
2 changed files with 14 additions and 1 deletions

View File

@ -82,4 +82,12 @@ mod tests {
panic!("{}", s);
}
}
#[test]
fn test_ipnetwork_size_with_prefix_0() {
let network: Ipv4Network = "0.0.0.0/0".parse().unwrap();
let size = network.size();
assert_eq!(size, u32::MAX);
}
}