-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Clarify docs for when binary_search has many matches. #54700
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
Conversation
r? @dtolnay (rust_highfive has picked a reviewer for you, use r? to override) |
r? @rust-lang/docs |
src/libcore/slice/mod.rs
Outdated
/// element could be inserted while maintaining sorted order. | ||
/// If the value is found then `Ok` is returned, containing the index of | ||
/// the matching element. If there are multiple matches, then any one of the | ||
/// matches could be returned. If the value is not found then `Err` is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add link to variant.
src/libcore/slice/mod.rs
Outdated
/// the index for the matched element; if no match is found then | ||
/// `Err` is returned, containing the index where a matching | ||
/// element could be inserted while maintaining sorted order. | ||
/// If the value is found then `Ok` is returned, containing the index of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add link to variant.
src/libcore/slice/mod.rs
Outdated
/// element could be inserted while maintaining sorted order. | ||
/// If the value is found then `Ok` is returned, containing the index of | ||
/// the matching element. If there are multiple matches, then any one of the | ||
/// matches could be returned. If the value is not found then `Err` is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add link to variant.
src/libcore/slice/mod.rs
Outdated
/// index for the matched element; if no match is found then `Err` | ||
/// is returned, containing the index where a matching element could | ||
/// be inserted while maintaining sorted order. | ||
/// If the value is found then `Ok` is returned, containing the index of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add link to variant.
src/libcore/slice/mod.rs
Outdated
/// be inserted while maintaining sorted order. | ||
/// If the value is found then `Ok` is returned, containing the index of | ||
/// the matching element. If there are multiple matches, then any one of the | ||
/// matches could be returned. If the value is not found then `Err` is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add link to variant.
17b1d28
to
9466f42
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@GuillaumeGomez Any suggestions how I should add links when these docs get used on |
1b12490
to
ceedaa6
Compare
ceedaa6
to
b5c64e2
Compare
@GuillaumeGomez CI is passing. r? |
Thanks! @bors: r+ rollup |
📌 Commit b5c64e2 has been approved by |
Clarify docs for when binary_search has many matches. Fixes #51817.
☀️ Test successful - status-appveyor, status-travis |
Fixes #51817.