summary refs log tree commit diff
path: root/src/libcoretest/slice.rs
AgeCommit message (Collapse)AuthorLines
2014-08-13core: Add binary_search and binary_search_elem methods to slices.Brian Anderson-0/+35
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.