Skip to content

Commit 43a6b6e

Browse files
authored
Merge pull request #399 from jswrenn/separate-changelog
Separate changelog into dedicated file & convert to markdown
2 parents cb362f6 + 7a12678 commit 43a6b6e

File tree

2 files changed

+307
-563
lines changed

2 files changed

+307
-563
lines changed

CHANGELOG.md

Lines changed: 307 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,307 @@
1+
# Changelog
2+
3+
## 0.8.2
4+
- Use `slice::iter` instead of `into_iter` to avoid future breakage (#378, by @LukasKalbertodt)
5+
## 0.8.1
6+
- 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
7+
- Added combinatory iterator adaptors:
8+
- [`.permutations(k)`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.permutations):
9+
10+
`[0, 1, 2].iter().permutations(2)` yields
11+
12+
```rust
13+
[
14+
vec![0, 1],
15+
vec![0, 2],
16+
vec![1, 0],
17+
vec![1, 2],
18+
vec![2, 0],
19+
vec![2, 1],
20+
]
21+
```
22+
23+
; by @tobz1000
24+
25+
- [`.combinations_with_replacement(k)`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.combinations_with_replacement):
26+
27+
`[0, 1, 2].iter().combinations_with_replacement(2)` yields
28+
29+
```rust
30+
[
31+
vec![0, 0],
32+
vec![0, 1],
33+
vec![0, 2],
34+
vec![1, 1],
35+
vec![1, 2],
36+
vec![2, 2],
37+
]
38+
```
39+
40+
; by @tommilligan
41+
42+
- For reference, these methods join the already existing [`.combinations(k)`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.combinations):
43+
44+
`[0, 1, 2].iter().combinations(2)` yields
45+
46+
```rust
47+
[
48+
vec![0, 1],
49+
vec![0, 2],
50+
vec![1, 2],
51+
]
52+
```
53+
54+
- 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
55+
- 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
56+
- Improved the performance of [`.all_equal()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.all_equal) ; by @fyrchik
57+
- 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
58+
- 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
59+
- 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
60+
## 0.8.0
61+
- Added new adaptor `.map_into()` for conversions using `Into` by @vorner
62+
- Improved `Itertools` docs by @JohnHeitmann
63+
- The return type of `.sorted_by_by_key()` is now an iterator, not a Vec.
64+
- The return type of the `izip!(x, y)` macro with exactly two arguments is now the usual `Iterator::zip`.
65+
- Remove `.flatten()` in favour of std's `.flatten()`
66+
- Deprecate `.foreach()` in favour of std's `.for_each()`
67+
- Deprecate `.step()` in favour of std's `.step_by()`
68+
- Deprecate `repeat_call` in favour of std's `repeat_with`
69+
- Deprecate `.fold_while()` in favour of std's `.try_fold()`
70+
- Require Rust 1.24 as minimal version.
71+
## 0.7.11
72+
- Add convenience methods to `EitherOrBoth`, making it more similar to `Option` and `Either` by @jethrogb
73+
## 0.7.10
74+
- No changes.
75+
## 0.7.9
76+
- New inclusion policy: See the readme about suggesting features for std before accepting them in itertools.
77+
- The `FoldWhile` type now implements `Eq` and `PartialEq` by @jturner314
78+
## 0.7.8
79+
- Add new iterator method `.tree_fold1()` which is like `.fold1()` except items are combined in a tree structure (see its docs). By @scottmcm
80+
- Add more `Debug` impls by @phimuemue: KMerge, KMergeBy, MergeJoinBy, ConsTuples, Intersperse, ProcessResults, RcIter, Tee, TupleWindows, Tee, ZipLongest, ZipEq, Zip.
81+
## 0.7.7
82+
- 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
83+
- 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.
84+
## 0.7.6
85+
- Add new adaptor `.multi_cartesian_product()` which is an n-ary product iterator by @tobz1000
86+
- Add new method `.sorted_by_key()` by @Xion
87+
- Provide simpler and faster `.count()` for `.unique()` and `.unique_by()`
88+
## 0.7.5
89+
- `.multipeek()` now implements `PeekingNext`, by @nicopap.
90+
## 0.7.4
91+
- Add new adaptor `.update()` by @lucasem; this adaptor is used to modify an element before passing it on in an iterator chain.
92+
## 0.7.3
93+
- Add new method `.collect_tuple()` by @matklad; it makes a tuple out of the iterator's elements if the number of them matches **exactly**.
94+
- Implement `fold` and `collect` for `.map_results()` which means it reuses the code of the standard `.map()` for these methods.
95+
## 0.7.2
96+
- Add new adaptor `.merge_join_by` by @srijs; a heterogeneous merge join for two ordered sequences.
97+
## 0.7.1
98+
- 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”*.
99+
## 0.7.0
100+
- Faster `izip!()` by @krdln
101+
- `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.
102+
- Faster `.unique()`
103+
- `no_std` support, which is opt-in!
104+
- Many lovable features are still there without std, like `izip!()` or `.format()` or `.merge()`, but not those that use collections.
105+
- Trait bounds were required up front instead of just on the type: `group_by`'s `PartialEq` by @Phlosioneer and `repeat_call`'s `FnMut`.
106+
- Removed deprecated constructor `Zip::new` — use `izip!()` or `multizip()`
107+
## 0.6.5
108+
- Fix bug in `.cartesian_product()`'s fold (which only was visible for unfused iterators).
109+
## 0.6.4
110+
- Add specific `fold` implementations for `.cartesian_product()` and `cons_tuples()`, which improves their performance in fold, foreach, and iterator consumers derived from them.
111+
## 0.6.3
112+
- Add iterator adaptor `.positions(predicate)` by @tmccombs
113+
## 0.6.2
114+
- 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
115+
- Add iterator method `.concat()` which combines all iterator elements into a single collection using the `Extend` trait, by @srijs
116+
## 0.6.1
117+
- Better size hint testing and subsequent size hint bugfixes by @rkarp. Fixes bugs in product, `interleave_shortest` size hints.
118+
- New iterator method `.all_equal()` by @phimuemue
119+
## 0.6.0
120+
- Deprecated names were removed in favour of their replacements
121+
- `.flatten()` does not implement double ended iteration anymore
122+
- `.fold_while()` uses `&mut self` and returns `FoldWhile<T>`, for composability #168
123+
- `.foreach()` and `.fold1()` use `self`, like `.fold()` does.
124+
- `.combinations(0)` now produces a single empty vector. #174
125+
## 0.5.10
126+
- Add itertools method `.kmerge_by()` (and corresponding free function)
127+
- Relaxed trait requirement of `.kmerge()` and `.minmax()` to PartialOrd.
128+
## 0.5.9
129+
- Add multipeek method `.reset_peek()`
130+
- Add categories
131+
## 0.5.8
132+
- Add iterator adaptor `.peeking_take_while()` and its trait `PeekingNext`.
133+
## 0.5.7
134+
- Add iterator adaptor `.with_position()`
135+
- Fix multipeek's performance for long peeks by using `VecDeque`.
136+
## 0.5.6
137+
- Add `.map_results()`
138+
## 0.5.5
139+
- Many more adaptors now implement `Debug`
140+
- Add free function constructor `repeat_n`. `RepeatN::new` is now deprecated.
141+
## 0.5.4
142+
- Add infinite generator function `iterate`, that takes a seed and a closure.
143+
## 0.5.3
144+
- Special-cased `.fold()` for flatten and put back. `.foreach()` now uses fold on the iterator, to pick up any iterator specific loop implementation.
145+
- `.combinations(n)` asserts up front that `n != 0`, instead of running into an error on the second iterator element.
146+
## 0.5.2
147+
- Add `.tuples::<T>()` that iterates by two, three or four elements at a time (where `T` is a tuple type).
148+
- Add `.tuple_windows::<T>()` that iterates using a window of the two, three or four most recent elements.
149+
- Add `.next_tuple::<T>()` method, that picks the next two, three or four elements in one go.
150+
- `.interleave()` now has an accurate size hint.
151+
## 0.5.1
152+
- Workaround module/function name clash that made racer crash on completing itertools. Only internal changes needed.
153+
## 0.5.0
154+
- [Release announcement](http://bluss.github.io/rust/2016/09/26/itertools-0.5.0/)
155+
- Renamed:
156+
- `combinations` is now `tuple_combinations`
157+
- `combinations_n` to `combinations`
158+
- `group_by_lazy`, `chunks_lazy` to `group_by`, `chunks`
159+
- `Unfold::new` to `unfold()`
160+
- `RepeatCall::new` to `repeat_call()`
161+
- `Zip::new` to `multizip`
162+
- `PutBack::new`, `PutBackN::new` to `put_back`, `put_back_n`
163+
- `PutBack::with_value` is now a builder setter, not a constructor
164+
- `MultiPeek::new`, `.multipeek()` to `multipeek()`
165+
- `format` to `format_with` and `format_default` to `format`
166+
- `.into_rc()` to `rciter`
167+
- `Partition` enum is now `Either`
168+
- Module reorganization:
169+
- All iterator structs are under `itertools::structs` but also reexported to the top level, for backwards compatibility
170+
- All free functions are reexported at the root, `itertools::free` will be removed in the next version
171+
- Removed:
172+
- `ZipSlices`, use `.zip()` instead
173+
- `.enumerate_from()`, `ZipTrusted`, due to being unstable
174+
- `.mend_slices()`, moved to crate `odds`
175+
- Stride, StrideMut, moved to crate `odds`
176+
- `linspace()`, moved to crate `itertools-num`
177+
- `.sort_by()`, use `.sorted_by()`
178+
- `.is_empty_hint()`, use `.size_hint()`
179+
- `.dropn()`, use `.dropping()`
180+
- `.map_fn()`, use `.map()`
181+
- `.slice()`, use `.take()` / `.skip()`
182+
- helper traits in `misc`
183+
- `new` constructors on iterator structs, use `Itertools` trait or free functions instead
184+
- `itertools::size_hint` is now private
185+
- Behaviour changes:
186+
- `format` and `format_with` helpers now panic if you try to format them more than once.
187+
- `repeat_call` is not double ended anymore
188+
- New features:
189+
- tuple flattening iterator is constructible with `cons_tuples`
190+
- itertools reexports `Either` from the `either` crate. `Either<L, R>` is an iterator when `L, R` are.
191+
- `MinMaxResult` now implements `Copy` and `Clone`
192+
- `tuple_combinations` supports 1-4 tuples of combinations (previously just 2)
193+
## 0.4.19
194+
- Add `.minmax_by()`
195+
- Add `itertools::free::cloned`
196+
- Add `itertools::free::rciter`
197+
- Improve `.step(n)` slightly to take advantage of specialized Fuse better.
198+
## 0.4.18
199+
- Only changes related to the "unstable" crate feature. This feature is more or less deprecated.
200+
- Use deprecated warnings when unstable is enabled. `.enumerate_from()` will be removed imminently since it's using a deprecated libstd trait.
201+
## 0.4.17
202+
- Fix bug in `.kmerge()` that caused it to often produce the wrong order #134
203+
## 0.4.16
204+
- Improve precision of the `interleave_shortest` adaptor's size hint (it is now computed exactly when possible).
205+
## 0.4.15
206+
- 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.
207+
## 0.4.14
208+
- Workaround an upstream regression in a rust nightly build that broke compilation of of `itertools::free::{interleave, merge}`
209+
## 0.4.13
210+
- Add `.minmax()` and `.minmax_by_key()`, iterator methods for finding both minimum and maximum in one scan.
211+
- Add `.format_default()`, a simpler version of `.format()` (lazy formatting for iterators).
212+
## 0.4.12
213+
- Add `.zip_eq()`, an adaptor like `.zip()` except it ensures iterators of inequal length don't pass silently (instead it panics).
214+
- Add `.fold_while()`, an iterator method that is a fold that can short-circuit.
215+
- Add `.partition_map()`, an iterator method that can separate elements into two collections.
216+
## 0.4.11
217+
- Add `.get()` for `Stride{,Mut}` and `.get_mut()` for `StrideMut`
218+
## 0.4.10
219+
- Improve performance of `.kmerge()`
220+
## 0.4.9
221+
- Add k-ary merge adaptor `.kmerge()`
222+
- Fix a bug in `.islice()` with ranges `a..b` where a `> b`.
223+
## 0.4.8
224+
- Implement `Clone`, `Debug` for `Linspace`
225+
## 0.4.7
226+
- Add function `diff_with()` that compares two iterators
227+
- Add `.combinations_n()`, an n-ary combinations iterator
228+
- Add methods `PutBack::with_value` and `PutBack::into_parts`.
229+
## 0.4.6
230+
- Add method `.sorted()`
231+
- Add module `itertools::free` with free function variants of common iterator adaptors and methods. For example `enumerate(iterable)`, `rev(iterable)`, and so on.
232+
## 0.4.5
233+
- Add `.flatten()`
234+
## 0.4.4
235+
- Allow composing `ZipSlices` with itself
236+
## 0.4.3
237+
- Write `iproduct!()` as a single expression; this allows temporary values in its arguments.
238+
## 0.4.2
239+
- Add `.fold_options()`
240+
- Require Rust 1.1 or later
241+
## 0.4.1
242+
- Update `.dropping()` to take advantage of `.nth()`
243+
## 0.4.0
244+
- `.merge()`, `.unique()` and `.dedup()` now perform better due to not using function pointers
245+
- Add free functions `enumerate()` and `rev()`
246+
- Breaking changes:
247+
- Return types of `.merge()` and `.merge_by()` renamed and changed
248+
- Method `Merge::new` removed
249+
- `.merge_by()` now takes a closure that returns bool.
250+
- Return type of `.dedup()` changed
251+
- Return type of `.mend_slices()` changed
252+
- Return type of `.unique()` changed
253+
- Removed function `times()`, struct `Times`: use a range instead
254+
- Removed deprecated macro `icompr!()`
255+
- Removed deprecated `FnMap` and method `.fn_map()`: use `.map_fn()`
256+
- `.interleave_shortest()` is no longer guaranteed to act like fused
257+
## 0.3.25
258+
- Rename `.sort_by()` to `.sorted_by()`. Old name is deprecated.
259+
- Fix well-formedness warnings from RFC 1214, no user visible impact
260+
## 0.3.24
261+
- Improve performance of `.merge()`'s ordering function slightly
262+
## 0.3.23
263+
- Added `.chunks()`, similar to (and based on) `.group_by_lazy()`.
264+
- Tweak linspace to match numpy.linspace and make it double ended.
265+
## 0.3.22
266+
- Added `ZipSlices`, a fast zip for slices
267+
## 0.3.21
268+
- Remove `Debug` impl for `Format`, it will have different use later
269+
## 0.3.20
270+
- Optimize `.group_by_lazy()`
271+
## 0.3.19
272+
- Added `.group_by_lazy()`, a possibly nonallocating group by
273+
- Added `.format()`, a nonallocating formatting helper for iterators
274+
- Remove uses of `RandomAccessIterator` since it has been deprecated in rust.
275+
## 0.3.17
276+
- Added (adopted) `Unfold` from rust
277+
## 0.3.16
278+
- Added adaptors `.unique()`, `.unique_by()`
279+
## 0.3.15
280+
- Added method `.sort_by()`
281+
## 0.3.14
282+
- Added adaptor `.while_some()`
283+
## 0.3.13
284+
- Added adaptor `.interleave_shortest()`
285+
- Added adaptor `.pad_using()`
286+
## 0.3.11
287+
- Added `assert_equal` function
288+
## 0.3.10
289+
- Bugfix `.combinations()` `size_hint`.
290+
## 0.3.8
291+
- Added source `RepeatCall`
292+
## 0.3.7
293+
- Added adaptor `PutBackN`
294+
- Added adaptor `.combinations()`
295+
## 0.3.6
296+
- Added `itertools::partition`, partition a sequence in place based on a predicate.
297+
- Deprecate `icompr!()` with no replacement.
298+
## 0.3.5
299+
- `.map_fn()` replaces deprecated `.fn_map()`.
300+
## 0.3.4
301+
- `.take_while_ref()` *by-ref adaptor*
302+
- `.coalesce()` *adaptor*
303+
- `.mend_slices()` *adaptor*
304+
## 0.3.3
305+
- `.dropping_back()` *method*
306+
- `.fold1()` *method*
307+
- `.is_empty_hint()` *method*

0 commit comments

Comments
 (0)