rust/src/liballoc
bors 17600c1ea7 Auto merge of #44682 - bluss:iter-rfold, r=dtolnay
Add iterator method .rfold(init, function); the reverse of fold

rfold is the reverse version of fold.

Fold allows iterators to implement a different (non-resumable) internal
iteration when it is more efficient than the external iteration implemented
through the next method. (Common examples are VecDeque and .chain()).

Introduce rfold() so that the same customization is available for reverse
iteration. This is achieved by both adding the method, and by having the
Rev\<I> adaptor connect Rev::rfold → I::fold and Rev::fold → I::rfold.

On the surface, rfold(..) is just .rev().fold(..), but the special case
implementations allow a data structure specific fold to be used through for
example .iter().rev(); we thus have gains even for users never calling exactly
rfold themselves.
2017-09-21 23:44:11 +00:00
..
benches Auto merge of #43010 - stjepang:stabilize-sort-unstable, r=alexcrichton 2017-07-02 23:54:32 +00:00
btree Remove unneeded loop. 2017-09-13 22:44:14 -04:00
tests Disable the new Hasher tests on Emscripten. 2017-09-12 17:28:07 +08:00
allocator.rs Auto merge of #44049 - alexcrichton:nounwind-allocators, r=BurntSushi 2017-08-29 00:58:17 +00:00
arc.rs Implement Arc/Rc raw pointer conversions for ?Sized 2017-09-16 16:34:13 -07:00
binary_heap.rs use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
borrow.rs Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
boxed.rs impl Hasher for {&mut Hasher, Box<Hasher>} 2017-09-12 17:28:07 +08:00
boxed_test.rs Direct conversions between slices and boxes. 2017-02-06 18:53:13 -05:00
Cargo.toml Merge crate collections into alloc 2017-06-13 23:37:34 -07:00
fmt.rs Add missing url for fmt module 2017-08-18 16:32:38 +02:00
heap.rs std: Mark allocation functions as nounwind 2017-08-28 08:06:52 -07:00
lib.rs Auto merge of #44682 - bluss:iter-rfold, r=dtolnay 2017-09-21 23:44:11 +00:00
linked_list.rs use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
macros.rs Implement Arc/Rc raw pointer conversions for ?Sized 2017-09-16 16:34:13 -07:00
range.rs Revert "Stabilize RangeArgument" 2017-06-30 08:34:53 -10:00
raw_vec.rs Rollup merge of #43891 - Fourchaux:master, r=steveklabnik 2017-08-17 10:44:07 -04:00
rc.rs Rollup merge of #44073 - murarth:rc-into-raw-unsized, r=alexcrichton 2017-09-17 13:18:59 +02:00
slice.rs Make slice::split_at_mut example demonstrate mutability 2017-09-04 22:59:34 +01:00
str.rs Rollup merge of #44521 - rwakulszowa:str_utf16_doc, r=frewsxcv 2017-09-14 22:32:45 -04:00
string.rs Updated tracking issue for String::splice and its unstable-book entry 2017-09-17 10:41:24 +02:00
vec.rs Auto merge of #44355 - Xaeroxe:optimize_drain_filter, r=alexcrichton 2017-09-20 06:29:42 +00:00
vec_deque.rs alloc: Implement rfold for VecDeque iterators 2017-09-18 21:56:59 +02:00