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

Make assert in select_biased documentation clearer #2926

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

TobiasBengtsson
Copy link
Contributor

No description provided.

@rustbot rustbot added A-macro Area: macro related S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 25, 2025
@taiki-e
Copy link
Member

taiki-e commented Feb 25, 2025

Thanks for the PR. This is select_biased, so res == 12 is indeed redundant and only res == 63 is fine. I think using res == 13 like this PR is not a good idea because it makes it impossible to tell from the example the difference from a normal select.

@taiki-e taiki-e added docs S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 25, 2025
@TobiasBengtsson
Copy link
Contributor Author

Thanks for the PR. This is select__biased_, so res == 12 is indeed redundant and only res == 63 is fine. I think using res == 13 like this PR is not a good idea because it makes it impossible to tell from the example the difference from a normal select.

Good point, I changed it to assert_eq!(res, 63) to make it clearer

@taiki-e taiki-e changed the title Fix assert in select_biased documentation Make assert in select_biased documentation clearer Feb 25, 2025
@taiki-e taiki-e merged commit 173c9f8 into rust-lang:master Feb 25, 2025
24 checks passed
@taiki-e taiki-e removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macro Area: macro related docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants