Rollup merge of #92288 - yescallop:patch-1, r=m-ou-se

Fix a pair of mistyped test cases in `std::net::ip`

These two test cases are not consistent with their comments, which I believe is unintended.
This commit is contained in:
Matthias Krüger 2022-01-06 12:01:00 +01:00 committed by GitHub
commit 2647ce2165
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -77,10 +77,10 @@ fn test_from_str_ipv4_in_ipv6() {
let none: Option<Ipv4Addr> = "::127.0.0.1:".parse().ok();
assert_eq!(None, none);
// not enough groups
let none: Option<Ipv6Addr> = "1.2.3.4.5:127.0.0.1".parse().ok();
let none: Option<Ipv6Addr> = "1:2:3:4:5:127.0.0.1".parse().ok();
assert_eq!(None, none);
// too many groups
let none: Option<Ipv6Addr> = "1.2.3.4.5:6:7:127.0.0.1".parse().ok();
let none: Option<Ipv6Addr> = "1:2:3:4:5:6:7:127.0.0.1".parse().ok();
assert_eq!(None, none);
}