-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Enhanced doucmentation of binary search methods for slice
and VecDeque
for unsorted instances
#106985
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @m-ou-se (or someone else) soon. Please see the contribution instructions for more information. |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
slice
and VecDeque
for unsorted instances
…e for unsorted instances
This looks like a clear improvement to me. I admit I did have to think a bit about the phrase "unspecified and meaningless". But, as you say, it's consistent with So let's see if we can get this merged! @bors r+ |
Oops, I just notice a small issue. @bors r- |
Lower down in the doc comments there are markdown link references like: /// [`contains`]: VecDeque::contains
These should also be removed as they are no longer used. |
Oh my, sorry for the sloppiness. I removed the deprecated links. |
Thanks! And sorry for only noticing at the last minute @bors r+ |
Rollup of 7 pull requests Successful merges: - rust-lang#106985 (Enhanced doucmentation of binary search methods for `slice` and `VecDeque` for unsorted instances) - rust-lang#109509 (compiletest: Don't allow tests with overlapping prefix names) - rust-lang#109719 (RELEASES: Add "Only support Android NDK 25 or newer" to 1.68.0) - rust-lang#109748 (Don't ICE on `DiscriminantKind` projection in new solver) - rust-lang#109749 (Canonicalize float var as float in new solver) - rust-lang#109761 (Drop binutils on powerpc-unknown-freebsd) - rust-lang#109766 (Fix title for openharmony.md) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #106746. Issue #106746 raises the concern that the binary search methods for slices and deques aren't explicit enough about the fact that they are only applicable to sorted slices/deques. I changed the explanation for these methods. I took the relatively harsh description of the behaviour of binary search on unsorted collections ("unspecified and meaningless") from the description of the
partition_point
method: