about summary refs log tree commit diff
path: root/src/libcollections/range.rs
AgeCommit message (Collapse)AuthorLines
2017-06-13Merge crate `collections` into `alloc`Murarth-152/+0
2017-05-21Make RangeInclusive just a two-field structScott McMurray-8/+2
Not being an enum improves ergonomics, especially since NonEmpty could be Empty. It can still be iterable without an extra "done" bit by making the range have !(start <= end), which is even possible without changing the Step trait. Implements RFC 1980
2017-04-10Apply clippy's doc_markdown improvements to libcollectionsAndre Bogus-1/+1
Since my last PR led to linker failure, I'm now taking much smaller steps. This only fixes some doc_markdown warnings; as they are in comments only, we shouldn't get any problems building.
2017-03-22Add 'the' before 'start'/'end'Stjepan Glavina-2/+2
2017-03-22Various fixes to wording consistency in the docsStjepan Glavina-4/+4
2017-03-17Minor fixups to fix tidy errorsAlex Crichton-2/+0
2017-02-18add impl for RangeToInclusiveDjzin-1/+11
2017-02-18impl RangeArgument for RangeInclusive and add appropriate testsDjzin-1/+17
2017-01-14make rangeargument methods non-default; simplify impldjzin-17/+18
2017-01-14allow unsized types in `RangeArgument`djzin-1/+19
2017-01-14fix up testsdjzin-9/+13
2017-01-14impl RangeArgument for (Bound<T>, Bound<T>)djzin-0/+18
2017-01-14have RangeArgument return a Bound<&T> from each of its methodsdjzin-12/+13
2016-08-24Remove needless imports in `libcollections`.Jeffrey Seyfried-1/+0
2016-08-02Add doc examples for `range::RangeArgument::{start,end}`.Corey Farwell-0/+32
2016-02-27note work still to be doneAlex Burka-0/+1
In particular, uses of inclusive ranges within the standard library are still waiting. Slices and collections can be sliced with `usize` and `Range*<usize>`, but not yet `Range*Inclusive<usize>`. Also, we need to figure out what to do about `RangeArgument`. Currently it has `start()` and `end()` methods which are pretty much identical to `Range::start` and `Range::end`. For the same reason as Range itself, these methods can't express a range such as `0...255u8` without overflow. The easiest choice, it seems to me, is either changing the meaning of `end()` to be inclusive, or adding a new method, say `last()`, that is inclusive and specifying that `end()` returns `None` in cases where it would overflow. Changing the semantics would be a breaking change, but `RangeArgument` is unstable so maybe we should do it anyway.
2016-01-13update tracking issue for collections_rangeAlex Burka-2/+3
2015-11-24rustfmt libcollectionsNick Cameron-6/+18
2015-08-15collections: Add issues for unstable featuresAlex Crichton-1/+2
2015-06-17collections: Split the `collections` featureAlex Crichton-0/+1
This commit also deprecates the `as_string` and `as_slice` free functions in the `string` and `vec` modules.
2015-04-27collections: Add trait RangeArgumentUlrik Sverdrup-0/+45
RangeArgument is introduced as unstable under the feature(collections_range)