summary refs log tree commit diff
path: root/src/libcoretest/iter.rs
AgeCommit message (Collapse)AuthorLines
2014-10-07Rename slicing methodsNick Cameron-2/+2
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-25/+26
2014-10-02rollup merge of #17666 : eddyb/take-garbage-outAlex Crichton-3/+2
Conflicts: src/libcollections/lib.rs src/libcore/lib.rs src/librustdoc/lib.rs src/librustrt/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/test/run-pass/issue-8898.rs
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-26/+25
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02Revert "Remove the `_` suffix from slice methods."Aaron Turon-2/+2
This reverts commit df2f1fa7680a86ba228f004e7de731e91a1df1fe.
2014-10-02tests: remove uses of Gc.Eduard Burtescu-3/+2
2014-10-02Remove the `_` suffix from slice methods.Nick Cameron-2/+2
Deprecates slicing methods from ImmutableSlice/MutableSlice in favour of slicing syntax or the methods in Slice/SliceMut. Closes #17273.
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-25/+26
2014-09-16Fallout from renamingAaron Turon-1/+1
2014-09-07Flip arguments to `std::iter::iterate`.Jonas Hietala-1/+1
Breaks `iterate(f, seed)`, use `iterate(seed, f)` instead. The convention is to have the closure last. Closes #17066. [breaking-change]
2014-08-26Rebasing changesNick Cameron-2/+2
2014-08-06core: Refactor iteratorsPiotr Czarnecki-0/+31
Simplifying the code of methods: nth, fold, rposition and iterators: Filter, FilterMap, SkipWhile Adding basic benchmarks
2014-07-24librustc: Stop desugaring `for` expressions and translate them directly.Patrick Walton-4/+4
This makes edge cases in which the `Iterator` trait was not in scope and/or `Option` or its variants were not in scope work properly. This breaks code that looks like: struct MyStruct { ... } impl MyStruct { fn next(&mut self) -> Option<int> { ... } } for x in MyStruct { ... } { ... } Change ad-hoc `next` methods like the above to implementations of the `Iterator` trait. For example: impl Iterator<int> for MyStruct { fn next(&mut self) -> Option<int> { ... } } Closes #15392. [breaking-change]
2014-07-13Add an iterate function to core::iterJakub Wieczorek-0/+9
Implementation by Kevin Ballard. The function returns an Unfold iterator producing an infinite stream of results of repeated applications of the function, starting from the provided seed value.
2014-06-29Implement RFC#28: Add PartialOrd::partial_cmpSteven Fackler-2/+2
I ended up altering the semantics of Json's PartialOrd implementation. It used to be the case that Null < Null, but I can't think of any reason for an ordering other than the default one so I just switched it over to using the derived implementation. This also fixes broken `PartialOrd` implementations for `Vec` and `TreeMap`. RFC: 0028-partial-cmp
2014-06-29Extract tests from libcore to a separate crateSteven Fackler-0/+835
Libcore's test infrastructure is complicated by the fact that many lang items are defined in the crate. The current approach (realcore/realstd imports) is hacky and hard to work with (tests inside of core::cmp haven't been run for months!). Moving tests to a separate crate does mean that they can only test the public API of libcore, but I don't feel that that is too much of an issue. The only tests that I had to get rid of were some checking the various numeric formatters, but those are also exercised through normal format! calls in other tests.