Unable to connect via the default port
Created by: h4nsu
cargo-contract
uses url
library to parse the command line argument to url::Url
and then converts it back to String
while passing to subxt::ClientBuilder
.
The whole url
lib operates under the assumption that if the default port for a particular protocol is used, it is represented as None
variant. For some reason it doesn't care to include that default port when converting Url
to String
:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=59e7111b1aa5c5542e1127c1f13b88ec
So that whole String
-> Url
-> String
conversion results in the port value being lost in case the default port was used. subxt::ClientBuilder
rejects to use an address without a port.