When I parse url with an invalid character like the # sign in the password part of the url I get Err(InvalidPort) error but I think I should be getting a more helpful error like InvalidPassword for instance
let parsed = Url::parse("postgres://user:pa#ss@host:9999/database");
println!("{:#?}", parsed);
The error is actually correct. Because the # is present in the password, the user is now parsed as a host, while pa is parsed as a port and fails. If you change the URL to postgres://user:12#ss... it will parse.
When I parse url with an invalid character like the # sign in the password part of the url I get
Err(InvalidPort)
error but I think I should be getting a more helpful error like InvalidPassword for instance