Debian Codegraph @

debian/rust-vendor/itertools/CHANGELOG.md

raw
1 # Changelog
2
3 ## 0.15.0
4
5 ### Breaking
6 - Restructure `Position` as struct instead of enum (#1042, #1043)
7 - Canonicalize `all_equal_value`'s error type (#1032)
8
9 ### Added
10 - Add `*_with_hasher` adaptors (#1007)
11 - Add strip_prefix and strip_prefix_by methods (#1104)
12
13 ### Changed
14 - Remove `Clone` bounds from `tuple_combinations` and `array_combinations`(#1011)
15 - `must_use` for `collect_vec` (#1009)
16 - Make `izip!` temporary friendly (#1021)
17 - Add `array_combinations_with_replacement` (#1033)
18 - Implement `Debug` for remaining public types (#1038)
19 - Specialize `ExactlyOneError::count` (#1046)
20 - Implement `PeekingNext` for more types, in particular `vec::IntoIter` (#1059, #1073)
21 - Fix `PadUsing::next_back` (#1082)
22 - Introduce `[circular_]array_windows`, deprecate `tuple_windows` (#1086)
23 - Deprecate `tuple_combinations` (replaced by `array_combinations`) (#1085)
24
25 ### Notable Internal Changes
26 - Make `into_group_map` code more idiomatic (#1027)
27 - Fix clippy lints (#1017, #1029, #1076, #1099)
28
29 ## 0.14.0
30
31 ### Breaking
32 - Increased MSRV to 1.63.0 (#960)
33 - Removed generic parameter from `cons_tuples` (#988)
34
35 ### Added
36 - Added `array_combinations` (#991)
37 - Added `k_smallest_relaxed` and variants (#925)
38 - Added `next_array` and `collect_array` (#560)
39 - Implemented `DoubleEndedIterator` for `FilterOk` (#948)
40 - Implemented `DoubleEndedIterator` for `FilterMapOk` (#950)
41
42 ### Changed
43 - Allow `Q: ?Sized` in `Itertools::contains` (#971)
44 - Improved hygiene of `chain!` (#943)
45 - Improved `into_group_map_by` documentation (#1000)
46 - Improved `tree_reduce` documentation (#955)
47 - Improved discoverability of `merge_join_by` (#966)
48 - Improved discoverability of `take_while_inclusive` (#972)
49 - Improved documentation of `find_or_last` and `find_or_first` (#984)
50 - Prevented exponentially large type sizes in `tuple_combinations` (#945)
51 - Added `track_caller` attr for `asser_equal` (#976)
52
53 ### Notable Internal Changes
54 - Fixed clippy lints (#956, #987, #1008)
55 - Addressed warnings within doctests (#964)
56 - CI: Run most tests with miri (#961)
57 - CI: Speed up "cargo-semver-checks" action (#938)
58 - Changed an instance of `default_features` in `Cargo.toml` to `default-features` (#985)
59
60 ## 0.13.0
61
62 ### Breaking
63 - Removed implementation of `DoubleEndedIterator` for `ConsTuples` (#853)
64 - Made `MultiProduct` fused and fixed on an empty iterator (#835, #834)
65 - Changed `iproduct!` to return tuples for maxi one iterator too (#870)
66 - Changed `PutBack::put_back` to return the old value (#880)
67 - Removed deprecated `repeat_call, Itertools::{foreach, step, map_results, fold_results}` (#878)
68 - Removed `TakeWhileInclusive::new` (#912)
69
70 ### Added
71 - Added `Itertools::{smallest_by, smallest_by_key, largest, largest_by, largest_by_key}` (#654, #885)
72 - Added `Itertools::tail` (#899)
73 - Implemented `DoubleEndedIterator` for `ProcessResults` (#910)
74 - Implemented `Debug` for `FormatWith` (#931)
75 - Added `Itertools::get` (#891)
76
77 ### Changed
78 - Deprecated `Itertools::group_by` (renamed `chunk_by`) (#866, #879)
79 - Deprecated `unfold` (use `std::iter::from_fn` instead) (#871)
80 - Optimized `GroupingMapBy` (#873, #876)
81 - Relaxed `Fn` bounds to `FnMut` in `diff_with, Itertools::into_group_map_by` (#886)
82 - Relaxed `Debug/Clone` bounds for `MapInto` (#889)
83 - Documented the `use_alloc` feature (#887)
84 - Optimized `Itertools::set_from` (#888)
85 - Removed badges in `README.md` (#890)
86 - Added "no-std" categories in `Cargo.toml` (#894)
87 - Fixed `Itertools::k_smallest` on short unfused iterators (#900)
88 - Deprecated `Itertools::tree_fold1` (renamed `tree_reduce`) (#895)
89 - Deprecated `GroupingMap::fold_first` (renamed `reduce`) (#902)
90 - Fixed `Itertools::k_smallest(0)` to consume the iterator, optimized `Itertools::k_smallest(1)` (#909)
91 - Specialized `Combinations::nth` (#914)
92 - Specialized `MergeBy::fold` (#920)
93 - Specialized `CombinationsWithReplacement::nth` (#923)
94 - Specialized `FlattenOk::{fold, rfold}` (#927)
95 - Specialized `Powerset::nth` (#924)
96 - Documentation fixes (#882, #936)
97 - Fixed `assert_equal` for iterators longer than `i32::MAX` (#932)
98 - Updated the `must_use` message of non-lazy `KMergeBy` and `TupleCombinations` (#939)
99
100 ### Notable Internal Changes
101 - Tested iterator laziness (#792)
102 - Created `CONTRIBUTING.md` (#767)
103
104 ## 0.12.1
105
106 ### Added
107 - Documented iteration order guarantee for `Itertools::[tuple_]combinations` (#822)
108 - Documented possible panic in `iterate` (#842)
109 - Implemented `Clone` and `Debug` for `Diff` (#845)
110 - Implemented `Debug` for `WithPosition` (#859)
111 - Implemented `Eq` for `MinMaxResult` (#838)
112 - Implemented `From<EitherOrBoth<A, B>>` for `Option<Either<A, B>>` (#843)
113 - Implemented `PeekingNext` for `RepeatN` (#855)
114
115 ### Changed
116 - Made `CoalesceBy` lazy (#801)
117 - Optimized `Filter[Map]Ok::next`, `Itertools::partition`, `Unique[By]::next[_back]` (#818)
118 - Optimized `Itertools::find_position` (#837)
119 - Optimized `Positions::next[_back]` (#816)
120 - Optimized `ZipLongest::fold` (#854)
121 - Relaxed `Debug` bounds for `GroupingMapBy` (#860)
122 - Specialized `ExactlyOneError::fold` (#826)
123 - Specialized `Interleave[Shortest]::fold` (#849)
124 - Specialized `MultiPeek::fold` (#820)
125 - Specialized `PadUsing::[r]fold` (#825)
126 - Specialized `PeekNth::fold` (#824)
127 - Specialized `Positions::[r]fold` (#813)
128 - Specialized `PutBackN::fold` (#823)
129 - Specialized `RepeatN::[r]fold` (#821)
130 - Specialized `TakeWhileInclusive::fold` (#851)
131 - Specialized `ZipLongest::rfold` (#848)
132
133 ### Notable Internal Changes
134 - Added test coverage in CI (#847, #856)
135 - Added semver check in CI (#784)
136 - Enforced `clippy` in CI (#740)
137 - Enforced `rustdoc` in CI (#840)
138 - Improved specialization tests (#807)
139 - More specialization benchmarks (#806)
140
141 ## 0.12.0
142
143 ### Breaking
144 - Made `take_while_inclusive` consume iterator by value (#709)
145 - Added `Clone` bound to `Unique` (#777)
146
147 ### Added
148 - Added `Itertools::try_len` (#723)
149 - Added free function `sort_unstable` (#796)
150 - Added `GroupMap::fold_with` (#778, #785)
151 - Added `PeekNth::{peek_mut, peek_nth_mut}` (#716)
152 - Added `PeekNth::{next_if, next_if_eq}` (#734)
153 - Added conversion into `(Option<A>,Option<B>)` to `EitherOrBoth` (#713)
154 - Added conversion from `Either<A, B>` to `EitherOrBoth<A, B>` (#715)
155 - Implemented `ExactSizeIterator` for `Tuples` (#761)
156 - Implemented `ExactSizeIterator` for `(Circular)TupleWindows` (#752)
157 - Made `EitherOrBoth<T>` a shorthand for `EitherOrBoth<T, T>` (#719)
158
159 ### Changed
160 - Added missing `#[must_use]` annotations on iterator adaptors (#794)
161 - Made `Combinations` lazy (#795)
162 - Made `Intersperse(With)` lazy (#797)
163 - Made `Permutations` lazy (#793)
164 - Made `Product` lazy (#800)
165 - Made `TupleWindows` lazy (#602)
166 - Specialized `Combinations::{count, size_hint}` (#729)
167 - Specialized `CombinationsWithReplacement::{count, size_hint}` (#737)
168 - Specialized `Powerset::fold` (#765)
169 - Specialized `Powerset::count` (#735)
170 - Specialized `TupleCombinations::{count, size_hint}` (#763)
171 - Specialized `TupleCombinations::fold` (#775)
172 - Specialized `WhileSome::fold` (#780)
173 - Specialized `WithPosition::fold` (#772)
174 - Specialized `ZipLongest::fold` (#774)
175 - Changed `{min, max}_set*` operations require `alloc` feature, instead of `std` (#760)
176 - Improved documentation of `tree_fold1` (#787)
177 - Improved documentation of `permutations` (#724)
178 - Fixed typo in documentation of `multiunzip` (#770)
179
180 ### Notable Internal Changes
181 - Improved specialization tests (#799, #786, #782)
182 - Simplified implementation of `Permutations` (#739, #748, #790)
183 - Combined `Merge`/`MergeBy`/`MergeJoinBy` implementations (#736)
184 - Simplified `Permutations::size_hint` (#739)
185 - Fix wrapping arithmetic in benchmarks (#770)
186 - Enforced `rustfmt` in CI (#751)
187 - Disallowed compile warnings in CI (#720)
188 - Used `cargo hack` to check MSRV (#754)
189
190 ## 0.11.0
191
192 ### Breaking
193 - Make `Itertools::merge_join_by` also accept functions returning bool (#704)
194 - Implement `PeekingNext` transitively over mutable references (#643)
195 - Change `with_position` to yield `(Position, Item)` instead of `Position<Item>` (#699)
196
197 ### Added
198 - Add `Itertools::take_while_inclusive` (#616)
199 - Implement `PeekingNext` for `PeekingTakeWhile` (#644)
200 - Add `EitherOrBoth::{just_left, just_right, into_left, into_right, as_deref, as_deref_mut, left_or_insert, right_or_insert, left_or_insert_with, right_or_insert_with, insert_left, insert_right, insert_both}` (#629)
201 - Implement `Clone` for `CircularTupleWindows` (#686)
202 - Implement `Clone` for `Chunks` (#683)
203 - Add `Itertools::process_results` (#680)
204
205 ### Changed
206 - Use `Cell` instead of `RefCell` in `Format` and `FormatWith` (#608)
207 - CI tweaks (#674, #675)
208 - Document and test the difference between stable and unstable sorts (#653)
209 - Fix documentation error on `Itertools::max_set_by_key` (#692)
210 - Move MSRV metadata to `Cargo.toml` (#672)
211 - Implement `equal` with `Iterator::eq` (#591)
212
213 ## 0.10.5
214 - Maintenance
215
216 ## 0.10.4
217 - Add `EitherOrBoth::or` and `EitherOrBoth::or_else` (#593)
218 - Add `min_set`, `max_set` et al. (#613, #323)
219 - Use `either/use_std` (#628)
220 - Documentation fixes (#612, #625, #632, #633, #634, #638)
221 - Code maintenance (#623, #624, #627, #630)
222
223 ## 0.10.3
224 - Maintenance
225
226 ## 0.10.2
227 - Add `Itertools::multiunzip` (#362, #565)
228 - Add `intersperse` and `intersperse_with` free functions (#555)
229 - Add `Itertools::sorted_by_cached_key` (#424, #575)
230 - Specialize `ProcessResults::fold` (#563)
231 - Fix subtraction overflow in `DuplicatesBy::size_hint` (#552)
232 - Fix specialization tests (#574)
233 - More `Debug` impls (#573)
234 - Deprecate `fold1` (use `reduce` instead) (#580)
235 - Documentation fixes (`HomogenousTuple`, `into_group_map`, `into_group_map_by`, `MultiPeek::peek`) (#543 et al.)
236
237 ## 0.10.1
238 - Add `Itertools::contains` (#514)
239 - Add `Itertools::counts_by` (#515)
240 - Add `Itertools::partition_result` (#511)
241 - Add `Itertools::all_unique` (#241)
242 - Add `Itertools::duplicates` and `Itertools::duplicates_by` (#502)
243 - Add `chain!` (#525)
244 - Add `Itertools::at_most_one` (#523)
245 - Add `Itertools::flatten_ok` (#527)
246 - Add `EitherOrBoth::or_default` (#583)
247 - Add `Itertools::find_or_last` and `Itertools::find_or_first` (#535)
248 - Implement `FusedIterator` for `FilterOk`, `FilterMapOk`, `InterleaveShortest`, `KMergeBy`, `MergeBy`, `PadUsing`, `Positions`, `Product` , `RcIter`, `TupleWindows`, `Unique`, `UniqueBy`, `Update`, `WhileSome`, `Combinations`, `CombinationsWithReplacement`, `Powerset`, `RepeatN`, and `WithPosition` (#550)
249 - Implement `FusedIterator` for `Interleave`, `IntersperseWith`, and `ZipLongest` (#548)
250
251 ## 0.10.0
252 - **Increase minimum supported Rust version to 1.32.0**
253 - Improve macro hygiene (#507)
254 - Add `Itertools::powerset` (#335)
255 - Add `Itertools::sorted_unstable`, `Itertools::sorted_unstable_by`, and `Itertools::sorted_unstable_by_key` (#494)
256 - Implement `Error` for `ExactlyOneError` (#484)
257 - Undeprecate `Itertools::fold_while` (#476)
258 - Tuple-related adapters work for tuples of arity up to 12 (#475)
259 - `use_alloc` feature for users who have `alloc`, but not `std` (#474)
260 - Add `Itertools::k_smallest` (#473)
261 - Add `Itertools::into_grouping_map` and `GroupingMap` (#465)
262 - Add `Itertools::into_grouping_map_by` and `GroupingMapBy` (#465)
263 - Add `Itertools::counts` (#468)
264 - Add implementation of `DoubleEndedIterator` for `Unique` (#442)
265 - Add implementation of `DoubleEndedIterator` for `UniqueBy` (#442)
266 - Add implementation of `DoubleEndedIterator` for `Zip` (#346)
267 - Add `Itertools::multipeek` (#435)
268 - Add `Itertools::dedup_with_count` and `DedupWithCount` (#423)
269 - Add `Itertools::dedup_by_with_count` and `DedupByWithCount` (#423)
270 - Add `Itertools::intersperse_with` and `IntersperseWith` (#381)
271 - Add `Itertools::filter_ok` and `FilterOk` (#377)
272 - Add `Itertools::filter_map_ok` and `FilterMapOk` (#377)
273 - Deprecate `Itertools::fold_results`, use `Itertools::fold_ok` instead (#377)
274 - Deprecate `Itertools::map_results`, use `Itertools::map_ok` instead (#377)
275 - Deprecate `FoldResults`, use `FoldOk` instead (#377)
276 - Deprecate `MapResults`, use `MapOk` instead (#377)
277 - Add `Itertools::circular_tuple_windows` and `CircularTupleWindows` (#350)
278 - Add `peek_nth` and `PeekNth` (#303)
279
280 ## 0.9.0
281 - Fix potential overflow in `MergeJoinBy::size_hint` (#385)
282 - Add `derive(Clone)` where possible (#382)
283 - Add `try_collect` method (#394)
284 - Add `HomogeneousTuple` trait (#389)
285 - Fix `combinations(0)` and `combinations_with_replacement(0)` (#383)
286 - Don't require `ParitalEq` to the `Item` of `DedupBy` (#397)
287 - Implement missing specializations on the `PutBack` adaptor and on the `MergeJoinBy` iterator (#372)
288 - Add `position_*` methods (#412)
289 - Derive `Hash` for `EitherOrBoth` (#417)
290 - Increase minimum supported Rust version to 1.32.0
291
292 ## 0.8.2
293 - Use `slice::iter` instead of `into_iter` to avoid future breakage (#378, by @LukasKalbertodt)
294 ## 0.8.1
295 - Added a [`.exactly_one()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.exactly_one) iterator method that, on success, extracts the single value of an iterator ; by @Xaeroxe
296 - Added combinatory iterator adaptors:
297 - [`.permutations(k)`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.permutations):
298
299 `[0, 1, 2].iter().permutations(2)` yields
300
301 ```rust
302 [
303 vec![0, 1],
304 vec![0, 2],
305 vec![1, 0],
306 vec![1, 2],
307 vec![2, 0],
308 vec![2, 1],
309 ]
310 ```
311
312 ; by @tobz1000
313
314 - [`.combinations_with_replacement(k)`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.combinations_with_replacement):
315
316 `[0, 1, 2].iter().combinations_with_replacement(2)` yields
317
318 ```rust
319 [
320 vec![0, 0],
321 vec![0, 1],
322 vec![0, 2],
323 vec![1, 1],
324 vec![1, 2],
325 vec![2, 2],
326 ]
327 ```
328
329 ; by @tommilligan
330
331 - For reference, these methods join the already existing [`.combinations(k)`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.combinations):
332
333 `[0, 1, 2].iter().combinations(2)` yields
334
335 ```rust
336 [
337 vec![0, 1],
338 vec![0, 2],
339 vec![1, 2],
340 ]
341 ```
342
343 - Improved the performance of [`.fold()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.fold)-based internal iteration for the [`.intersperse()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.intersperse) iterator ; by @jswrenn
344 - Added [`.dedup_by()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.dedup_by), [`.merge_by()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.merge_by) and [`.kmerge_by()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.kmerge_by) adaptors that work like [`.dedup()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.dedup), [`.merge()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.merge) and [`.kmerge()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.kmerge), but taking an additional custom comparison closure parameter. ; by @phimuemue
345 - Improved the performance of [`.all_equal()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.all_equal) ; by @fyrchik
346 - Loosened the bounds on [`.partition_map()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.partition_map) to take just a `FnMut` closure rather than a `Fn` closure, and made its implementation use internal iteration for better performance ; by @danielhenrymantilla
347 - Added convenience methods to [`EitherOrBoth`](https://docs.rs/itertools/0.8.1/itertools/enum.EitherOrBoth.html) elements yielded from the [`.zip_longest()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.zip_longest) iterator adaptor ; by @Avi-D-coder
348 - Added [`.sum1()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.sum1) and [`.product1()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.product1) iterator methods that respectively try to return the sum and the product of the elements of an iterator **when it is not empty**, otherwise they return `None` ; by @Emerentius
349 ## 0.8.0
350 - Added new adaptor `.map_into()` for conversions using `Into` by @vorner
351 - Improved `Itertools` docs by @JohnHeitmann
352 - The return type of `.sorted_by_by_key()` is now an iterator, not a Vec.
353 - The return type of the `izip!(x, y)` macro with exactly two arguments is now the usual `Iterator::zip`.
354 - Remove `.flatten()` in favour of std's `.flatten()`
355 - Deprecate `.foreach()` in favour of std's `.for_each()`
356 - Deprecate `.step()` in favour of std's `.step_by()`
357 - Deprecate `repeat_call` in favour of std's `repeat_with`
358 - Deprecate `.fold_while()` in favour of std's `.try_fold()`
359 - Require Rust 1.24 as minimal version.
360 ## 0.7.11
361 - Add convenience methods to `EitherOrBoth`, making it more similar to `Option` and `Either` by @jethrogb
362 ## 0.7.10
363 - No changes.
364 ## 0.7.9
365 - New inclusion policy: See the readme about suggesting features for std before accepting them in itertools.
366 - The `FoldWhile` type now implements `Eq` and `PartialEq` by @jturner314
367 ## 0.7.8
368 - Add new iterator method `.tree_fold1()` which is like `.fold1()` except items are combined in a tree structure (see its docs). By @scottmcm
369 - Add more `Debug` impls by @phimuemue: KMerge, KMergeBy, MergeJoinBy, ConsTuples, Intersperse, ProcessResults, RcIter, Tee, TupleWindows, Tee, ZipLongest, ZipEq, Zip.
370 ## 0.7.7
371 - Add new iterator method `.into_group_map() -> HashMap<K, Vec<V>>` which turns an iterator of `(K, V)` elements into such a hash table, where values are grouped by key. By @tobz1000
372 - Add new free function `flatten` for the `.flatten()` adaptor. **NOTE:** recent Rust nightlies have `Iterator::flatten` and thus a clash with our flatten adaptor. One workaround is to use the itertools `flatten` free function.
373 ## 0.7.6
374 - Add new adaptor `.multi_cartesian_product()` which is an n-ary product iterator by @tobz1000
375 - Add new method `.sorted_by_key()` by @Xion
376 - Provide simpler and faster `.count()` for `.unique()` and `.unique_by()`
377 ## 0.7.5
378 - `.multipeek()` now implements `PeekingNext`, by @nicopap.
379 ## 0.7.4
380 - Add new adaptor `.update()` by @lucasem; this adaptor is used to modify an element before passing it on in an iterator chain.
381 ## 0.7.3
382 - Add new method `.collect_tuple()` by @matklad; it makes a tuple out of the iterator's elements if the number of them matches **exactly**.
383 - Implement `fold` and `collect` for `.map_results()` which means it reuses the code of the standard `.map()` for these methods.
384 ## 0.7.2
385 - Add new adaptor `.merge_join_by` by @srijs; a heterogeneous merge join for two ordered sequences.
386 ## 0.7.1
387 - Iterator adaptors and iterators in itertools now use the same `must_use` reminder that the standard library adaptors do, by @matematikaedit and @bluss *“iterator adaptors are lazy and do nothing unless consumed”*.
388 ## 0.7.0
389 - Faster `izip!()` by @krdln
390 - `izip!()` is now a wrapper for repeated regular `.zip()` and a single `.map()`. This means it optimizes as well as the standard library `.zip()` it uses. **Note:** `multizip` and `izip!()` are now different! The former has a named type but the latter optimizes better.
391 - Faster `.unique()`
392 - `no_std` support, which is opt-in!
393 - Many lovable features are still there without std, like `izip!()` or `.format()` or `.merge()`, but not those that use collections.
394 - Trait bounds were required up front instead of just on the type: `group_by`'s `PartialEq` by @Phlosioneer and `repeat_call`'s `FnMut`.
395 - Removed deprecated constructor `Zip::new` — use `izip!()` or `multizip()`
396 ## 0.6.5
397 - Fix bug in `.cartesian_product()`'s fold (which only was visible for unfused iterators).
398 ## 0.6.4
399 - Add specific `fold` implementations for `.cartesian_product()` and `cons_tuples()`, which improves their performance in fold, foreach, and iterator consumers derived from them.
400 ## 0.6.3
401 - Add iterator adaptor `.positions(predicate)` by @tmccombs
402 ## 0.6.2
403 - Add function `process_results` which can “lift” a function of the regular values of an iterator so that it can process the `Ok` values from an iterator of `Results` instead, by @shepmaster
404 - Add iterator method `.concat()` which combines all iterator elements into a single collection using the `Extend` trait, by @srijs
405 ## 0.6.1
406 - Better size hint testing and subsequent size hint bugfixes by @rkarp. Fixes bugs in product, `interleave_shortest` size hints.
407 - New iterator method `.all_equal()` by @phimuemue
408 ## 0.6.0
409 - Deprecated names were removed in favour of their replacements
410 - `.flatten()` does not implement double ended iteration anymore
411 - `.fold_while()` uses `&mut self` and returns `FoldWhile<T>`, for composability #168
412 - `.foreach()` and `.fold1()` use `self`, like `.fold()` does.
413 - `.combinations(0)` now produces a single empty vector. #174
414 ## 0.5.10
415 - Add itertools method `.kmerge_by()` (and corresponding free function)
416 - Relaxed trait requirement of `.kmerge()` and `.minmax()` to PartialOrd.
417 ## 0.5.9
418 - Add multipeek method `.reset_peek()`
419 - Add categories
420 ## 0.5.8
421 - Add iterator adaptor `.peeking_take_while()` and its trait `PeekingNext`.
422 ## 0.5.7
423 - Add iterator adaptor `.with_position()`
424 - Fix multipeek's performance for long peeks by using `VecDeque`.
425 ## 0.5.6
426 - Add `.map_results()`
427 ## 0.5.5
428 - Many more adaptors now implement `Debug`
429 - Add free function constructor `repeat_n`. `RepeatN::new` is now deprecated.
430 ## 0.5.4
431 - Add infinite generator function `iterate`, that takes a seed and a closure.
432 ## 0.5.3
433 - Special-cased `.fold()` for flatten and put back. `.foreach()` now uses fold on the iterator, to pick up any iterator specific loop implementation.
434 - `.combinations(n)` asserts up front that `n != 0`, instead of running into an error on the second iterator element.
435 ## 0.5.2
436 - Add `.tuples::<T>()` that iterates by two, three or four elements at a time (where `T` is a tuple type).
437 - Add `.tuple_windows::<T>()` that iterates using a window of the two, three or four most recent elements.
438 - Add `.next_tuple::<T>()` method, that picks the next two, three or four elements in one go.
439 - `.interleave()` now has an accurate size hint.
440 ## 0.5.1
441 - Workaround module/function name clash that made racer crash on completing itertools. Only internal changes needed.
442 ## 0.5.0
443 - [Release announcement](https://bluss.github.io/rust/2016/09/26/itertools-0.5.0/)
444 - Renamed:
445 - `combinations` is now `tuple_combinations`
446 - `combinations_n` to `combinations`
447 - `group_by_lazy`, `chunks_lazy` to `group_by`, `chunks`
448 - `Unfold::new` to `unfold()`
449 - `RepeatCall::new` to `repeat_call()`
450 - `Zip::new` to `multizip`
451 - `PutBack::new`, `PutBackN::new` to `put_back`, `put_back_n`
452 - `PutBack::with_value` is now a builder setter, not a constructor
453 - `MultiPeek::new`, `.multipeek()` to `multipeek()`
454 - `format` to `format_with` and `format_default` to `format`
455 - `.into_rc()` to `rciter`
456 - `Partition` enum is now `Either`
457 - Module reorganization:
458 - All iterator structs are under `itertools::structs` but also reexported to the top level, for backwards compatibility
459 - All free functions are reexported at the root, `itertools::free` will be removed in the next version
460 - Removed:
461 - `ZipSlices`, use `.zip()` instead
462 - `.enumerate_from()`, `ZipTrusted`, due to being unstable
463 - `.mend_slices()`, moved to crate `odds`
464 - Stride, StrideMut, moved to crate `odds`
465 - `linspace()`, moved to crate `itertools-num`
466 - `.sort_by()`, use `.sorted_by()`
467 - `.is_empty_hint()`, use `.size_hint()`
468 - `.dropn()`, use `.dropping()`
469 - `.map_fn()`, use `.map()`
470 - `.slice()`, use `.take()` / `.skip()`
471 - helper traits in `misc`
472 - `new` constructors on iterator structs, use `Itertools` trait or free functions instead
473 - `itertools::size_hint` is now private
474 - Behaviour changes:
475 - `format` and `format_with` helpers now panic if you try to format them more than once.
476 - `repeat_call` is not double ended anymore
477 - New features:
478 - tuple flattening iterator is constructible with `cons_tuples`
479 - itertools reexports `Either` from the `either` crate. `Either<L, R>` is an iterator when `L, R` are.
480 - `MinMaxResult` now implements `Copy` and `Clone`
481 - `tuple_combinations` supports 1-4 tuples of combinations (previously just 2)
482 ## 0.4.19
483 - Add `.minmax_by()`
484 - Add `itertools::free::cloned`
485 - Add `itertools::free::rciter`
486 - Improve `.step(n)` slightly to take advantage of specialized Fuse better.
487 ## 0.4.18
488 - Only changes related to the "unstable" crate feature. This feature is more or less deprecated.
489 - Use deprecated warnings when unstable is enabled. `.enumerate_from()` will be removed imminently since it's using a deprecated libstd trait.
490 ## 0.4.17
491 - Fix bug in `.kmerge()` that caused it to often produce the wrong order #134
492 ## 0.4.16
493 - Improve precision of the `interleave_shortest` adaptor's size hint (it is now computed exactly when possible).
494 ## 0.4.15
495 - Fixup on top of the workaround in 0.4.14. A function in `itertools::free` was removed by mistake and now it is added back again.
496 ## 0.4.14
497 - Workaround an upstream regression in a Rust nightly build that broke compilation of of `itertools::free::{interleave, merge}`
498 ## 0.4.13
499 - Add `.minmax()` and `.minmax_by_key()`, iterator methods for finding both minimum and maximum in one scan.
500 - Add `.format_default()`, a simpler version of `.format()` (lazy formatting for iterators).
501 ## 0.4.12
502 - Add `.zip_eq()`, an adaptor like `.zip()` except it ensures iterators of inequal length don't pass silently (instead it panics).
503 - Add `.fold_while()`, an iterator method that is a fold that can short-circuit.
504 - Add `.partition_map()`, an iterator method that can separate elements into two collections.
505 ## 0.4.11
506 - Add `.get()` for `Stride{,Mut}` and `.get_mut()` for `StrideMut`
507 ## 0.4.10
508 - Improve performance of `.kmerge()`
509 ## 0.4.9
510 - Add k-ary merge adaptor `.kmerge()`
511 - Fix a bug in `.islice()` with ranges `a..b` where a `> b`.
512 ## 0.4.8
513 - Implement `Clone`, `Debug` for `Linspace`
514 ## 0.4.7
515 - Add function `diff_with()` that compares two iterators
516 - Add `.combinations_n()`, an n-ary combinations iterator
517 - Add methods `PutBack::with_value` and `PutBack::into_parts`.
518 ## 0.4.6
519 - Add method `.sorted()`
520 - Add module `itertools::free` with free function variants of common iterator adaptors and methods. For example `enumerate(iterable)`, `rev(iterable)`, and so on.
521 ## 0.4.5
522 - Add `.flatten()`
523 ## 0.4.4
524 - Allow composing `ZipSlices` with itself
525 ## 0.4.3
526 - Write `iproduct!()` as a single expression; this allows temporary values in its arguments.
527 ## 0.4.2
528 - Add `.fold_options()`
529 - Require Rust 1.1 or later
530 ## 0.4.1
531 - Update `.dropping()` to take advantage of `.nth()`
532 ## 0.4.0
533 - `.merge()`, `.unique()` and `.dedup()` now perform better due to not using function pointers
534 - Add free functions `enumerate()` and `rev()`
535 - Breaking changes:
536 - Return types of `.merge()` and `.merge_by()` renamed and changed
537 - Method `Merge::new` removed
538 - `.merge_by()` now takes a closure that returns bool.
539 - Return type of `.dedup()` changed
540 - Return type of `.mend_slices()` changed
541 - Return type of `.unique()` changed
542 - Removed function `times()`, struct `Times`: use a range instead
543 - Removed deprecated macro `icompr!()`
544 - Removed deprecated `FnMap` and method `.fn_map()`: use `.map_fn()`
545 - `.interleave_shortest()` is no longer guaranteed to act like fused
546 ## 0.3.25
547 - Rename `.sort_by()` to `.sorted_by()`. Old name is deprecated.
548 - Fix well-formedness warnings from RFC 1214, no user visible impact
549 ## 0.3.24
550 - Improve performance of `.merge()`'s ordering function slightly
551 ## 0.3.23
552 - Added `.chunks()`, similar to (and based on) `.group_by_lazy()`.
553 - Tweak linspace to match numpy.linspace and make it double ended.
554 ## 0.3.22
555 - Added `ZipSlices`, a fast zip for slices
556 ## 0.3.21
557 - Remove `Debug` impl for `Format`, it will have different use later
558 ## 0.3.20
559 - Optimize `.group_by_lazy()`
560 ## 0.3.19
561 - Added `.group_by_lazy()`, a possibly nonallocating group by
562 - Added `.format()`, a nonallocating formatting helper for iterators
563 - Remove uses of `RandomAccessIterator` since it has been deprecated in Rust.
564 ## 0.3.17
565 - Added (adopted) `Unfold` from Rust
566 ## 0.3.16
567 - Added adaptors `.unique()`, `.unique_by()`
568 ## 0.3.15
569 - Added method `.sort_by()`
570 ## 0.3.14
571 - Added adaptor `.while_some()`
572 ## 0.3.13
573 - Added adaptor `.interleave_shortest()`
574 - Added adaptor `.pad_using()`
575 ## 0.3.11
576 - Added `assert_equal` function
577 ## 0.3.10
578 - Bugfix `.combinations()` `size_hint`.
579 ## 0.3.8
580 - Added source `RepeatCall`
581 ## 0.3.7
582 - Added adaptor `PutBackN`
583 - Added adaptor `.combinations()`
584 ## 0.3.6
585 - Added `itertools::partition`, partition a sequence in place based on a predicate.
586 - Deprecate `icompr!()` with no replacement.
587 ## 0.3.5
588 - `.map_fn()` replaces deprecated `.fn_map()`.
589 ## 0.3.4
590 - `.take_while_ref()` *by-ref adaptor*
591 - `.coalesce()` *adaptor*
592 - `.mend_slices()` *adaptor*
593 ## 0.3.3
594 - `.dropping_back()` *method*
595 - `.fold1()` *method*
596 - `.is_empty_hint()` *method*