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