Skip to content
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

try_bind should return a Future (or its docs are inconsistent) #599

Closed
abreis opened this issue Jun 9, 2020 · 3 comments
Closed

try_bind should return a Future (or its docs are inconsistent) #599

abreis opened this issue Jun 9, 2020 · 3 comments

Comments

@abreis
Copy link

abreis commented Jun 9, 2020

I was going through server.rs and noticed that Server::try_bind says:

(...) returning a Future that can be executed on any runtime.

but it actually ends in .await; and returns nothing.

I dug around a bit and it did return a Future in the original PR in #250 (which is consistent with the behavior of bind(), but #265 changed that behavior. I can't tell if it that change was intentional or a lapse, so I'm only reporting the inconsistency.

@abreis
Copy link
Author

abreis commented Jun 9, 2020

Same with TlsServer::bind (which actually makes it inconsistent with Server::bind).

@ivan
Copy link

ivan commented Jun 9, 2020

Don't all async functions return a Future?

@abreis
Copy link
Author

abreis commented Jun 9, 2020

Nevermind, I missed the fact that Server::bind is a plain fn but the others are async fns.

@abreis abreis closed this as completed Jun 9, 2020
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

2 participants