You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use url::{Url,Host};fnmain(){let u = Url::parse("http://[::1]").unwrap();assert_eq!(u.host(), Some(Host::Ipv6("::1".parse().unwrap())));let u = Url::parse("http://127.0.0.1").unwrap();assert_eq!(u.host(), Some(Host::Ipv4("127.0.0.1".parse().unwrap())));let u = Url::parse("foo://[::1]").unwrap();assert_eq!(u.host(), Some(Host::Ipv6("::1".parse().unwrap())));let u = Url::parse("foo://127.0.0.1").unwrap();assert_eq!(u.host(), Some(Host::Ipv4("127.0.0.1".parse().unwrap())));}
The following code fails on the final assert:
With:
I think this is a bug, I think the behaviour should be the same as for a v6 ip address.
The text was updated successfully, but these errors were encountered: