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

small change in select example. #2345

Merged
merged 3 commits into from
Feb 14, 2021
Merged

small change in select example. #2345

merged 3 commits into from
Feb 14, 2021

Conversation

tungli
Copy link
Contributor

@tungli tungli commented Feb 14, 2021

In the previous example one future always finished first (because of implementation details), possibly confusing users about what select does.

This commit resolves the issue by being explicit about one future finishing before the other.

Closes #2334

In the previous example one future always finished first (because of
implementation details), possibly confusing users about what `select`
does.

This commit resolves the issue by being explicit about one future
finishing before the other.
@tungli tungli mentioned this pull request Feb 14, 2021
Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks good to me aside from a few nits.

futures-util/src/future/select.rs Outdated Show resolved Hide resolved
futures-util/src/future/select.rs Outdated Show resolved Hide resolved
@taiki-e taiki-e added the docs label Feb 14, 2021
tungli and others added 2 commits February 14, 2021 18:32
Co-authored-by: Taiki Endo <te316e89@gmail.com>
@taiki-e taiki-e merged commit 6acaa81 into rust-lang:master Feb 14, 2021
exrook pushed a commit to exrook/futures-rs that referenced this pull request Apr 5, 2021
In the previous example one future always finished first (because of
implementation details), possibly confusing users about what `select`
does.

This commit resolves the issue by being explicit about one future
finishing before the other.

Co-authored-by: tungli <tun@mail.muni.cz>
Co-authored-by: Taiki Endo <te316e89@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

select example in docs
2 participants