about summary refs log tree commit diff
path: root/src/libcoretest/slice.rs
AgeCommit message (Collapse)AuthorLines
2015-02-26remove some compiler warningsTshepang Lekhonkhobe-3/+3
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-6/+6
2015-01-30Remove all `i` suffixesTobias Bucher-10/+10
2015-01-07use slicing sugarJorge Aparicio-3/+3
2015-01-07falloutNick Cameron-8/+8
2015-01-07Replace full slice notation with index callsNick Cameron-7/+7
2014-12-30Fallout from stabilizationAaron Turon-11/+11
2014-11-26Test fixes and rebase conflictsAlex Crichton-1/+1
2014-11-25Add methods to go from a slice iterators to a slice.Huon Wilson-0/+49
A slice iterator is isomorphic to a slice, just with a slightly different form: storing start and end pointers rather than start pointer and length. This patch reflects this by making converting between them as easy as `iter.as_slice()` (or even `iter[]` if the shorter lifetime is ok). That is, `slice.iter().as_slice() == slice`.
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.