Skip to content

newly stabilized std::net::lookup_host not very ergonomic to use #23700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nwin opened this issue Mar 25, 2015 · 2 comments
Closed

newly stabilized std::net::lookup_host not very ergonomic to use #23700

nwin opened this issue Mar 25, 2015 · 2 comments

Comments

@nwin
Copy link
Contributor

nwin commented Mar 25, 2015

The new lookup_host method now returns SocketAddrs instead of an IpAddrs. Unfortunately the returned SocketAddr is not very useful because it defaults to port 0. Since SocketAddr does not have any setters for the port I basically have to re-create every single returned value to make use of it.

lookup_host should either take a port as an argument or only return IP addresses. I would prefer the latter.

@alexcrichton
Copy link
Member

I agree that stabilizing it may have been a little hasty. I've proposed destabilizing it as part of #23711

@steveklabnik
Copy link
Member

Since it was destabilized, I'm going to give this a close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants