diff options
| author | Brian Anderson <banderson@mozilla.com> | 2014-08-06 20:48:25 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-08-13 11:30:15 -0700 |
| commit | a4b354ca0258b4914b6e6b64b0143a8aec861fa0 (patch) | |
| tree | 4054b1c1f9b69e42bcd90724b085998062a7dfcd /src/rustllvm/ExecutionEngineWrapper.cpp | |
| parent | 76d46af6d405ac29d2d508705eacdcffad63e4c1 (diff) | |
| download | rust-a4b354ca0258b4914b6e6b64b0143a8aec861fa0.tar.gz rust-a4b354ca0258b4914b6e6b64b0143a8aec861fa0.zip | |
core: Add binary_search and binary_search_elem methods to slices.
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.
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
