mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 18:40:57 +03:00
a4b354ca02
These are like the existing bsearch methods but if the search fails, it returns the next insertion point. The new `binary_search` returns a `BinarySearchResult` that is either `Found` or `NotFound`. For convenience, the `found` and `not_found` methods convert to `Option`, ala `Result`. Deprecate bsearch and bsearch_elem.