Closed dangerousplay closed 4 years ago
I like the idea of having a generic ToSocketAddrs implementation, but, I do not like the fact that the user must explicitly provide the generic param. I wonder if this is another way to do this, but to have the type automatically inferred.
There's actually an easy fix here.
If you go to the io.rs
file and check the connect
methods and replace the impl Borrow<C>
with just C
, and then you remove the line let ctor_arg = ctor_arg.borrow().clone();
it will work exactly as it did before. You can then remove the explicit &str
from the connect function generic param.
Please make those changes and then make sure you format/clippy your changeset.
Changed as you said. Thanks for the time.
Thanks for help and the better flexibility with the ctor arg
Thanks for the PR, I'll take a look at it after work. I see that it failed in CI due to a format failure, please run
cargo fmt
.