Skip to content

Commit 7554521

Browse files
Merge #376
376: 0.8.1 release r=jswrenn a=danielhenrymantilla Updated Changelog and `Cargo.toml` for the ~~0.9.0~~ 0.8.1 release, as suggested in #366 (comment) - [Rendered](https://github.com/rust-itertools/itertools/blob/a7a1203960451fe2ba21394e5b38981ef8323181/README.rst) Co-authored-by: Daniel Henry-Mantilla <[email protected]>
2 parents 340e06f + a7a1203 commit 7554521

File tree

2 files changed

+92
-1
lines changed

2 files changed

+92
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "itertools"
3-
version = "0.8.0"
3+
version = "0.8.1"
44

55
license = "MIT/Apache-2.0"
66
repository = "https://github.com/bluss/rust-itertools"

README.rst

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,97 @@ then it can't be accepted into ``libcore``, and you should propose it for ``iter
4848
Recent Changes
4949
--------------
5050

51+
- 0.8.1
52+
53+
- Added a `.exactly_one() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.exactly_one>`_
54+
iterator method that, on success, extracts the single value of an
55+
iterator
56+
; by `@Xaeroxe <https://github.com/Xaeroxe>`_
57+
58+
- Added combinatory iterator adaptors:
59+
60+
- `.permutations(k) <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.permutations>`_:
61+
62+
``[0, 1, 2].iter().permutations(2)`` yields
63+
64+
.. code:: rust
65+
66+
[
67+
vec![0, 1],
68+
vec![0, 2],
69+
vec![1, 0],
70+
vec![1, 2],
71+
vec![2, 0],
72+
vec![2, 1],
73+
]
74+
75+
; by `@tobz1000 <https://github.com/tobz1000>`_
76+
77+
- `.combinations_with_replacement(k) <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.combinations_with_replacement>`_:
78+
79+
``[0, 1, 2].iter().combinations_with_replacement(2)`` yields
80+
81+
.. code:: rust
82+
83+
[
84+
vec![0, 0],
85+
vec![0, 1],
86+
vec![0, 2],
87+
vec![1, 1],
88+
vec![1, 2],
89+
vec![2, 2],
90+
]
91+
92+
; by `@tommilligan <https://github.com/tommilligan>`_
93+
94+
- For reference, these methods join the already existing
95+
`.combinations(k) <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.combinations>`_:
96+
97+
``[0, 1, 2].iter().combinations(2)`` yields
98+
99+
.. code:: rust
100+
101+
[
102+
vec![0, 1],
103+
vec![0, 2],
104+
vec![1, 2],
105+
]
106+
107+
- Improved the performance of `.fold() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.fold>`_-based internal iteration for the
108+
`.intersperse() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.intersperse>`_ iterator
109+
; by `@jswrenn <https://github.com/jswrenn>`_
110+
111+
- Added
112+
`.dedup_by() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.dedup_by>`_,
113+
`.merge_by() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.merge_by>`_
114+
and `.kmerge_by() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.kmerge_by>`_
115+
adaptors that work like
116+
`.dedup() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.dedup>`_,
117+
`.merge() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.merge>`_ and
118+
`.kmerge() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.kmerge>`_,
119+
but taking an additional custom comparison closure parameter.
120+
; by `@phimuemue <https://github.com/phimuemue>`_
121+
122+
- Improved the performance of `.all_equal() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.all_equal>`_
123+
; by `@fyrchik <https://github.com/fyrchik>`_
124+
125+
- Loosened the bounds on `.partition_map() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.partition_map>`_
126+
to take just a ``FnMut`` closure rather than a ``Fn`` closure, and made its
127+
implementation use internal iteration for better performance
128+
; by `@danielhenrymantilla <https://github.com/danielhenrymantilla>`_
129+
130+
- Added convenience methods to
131+
`EitherOrBoth <https://docs.rs/itertools/0.8.1/itertools/enum.EitherOrBoth.html>`_ elements yielded from the
132+
`.zip_longest() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.zip_longest>`_ iterator adaptor
133+
; by `@Avi-D-coder <https://github.com/Avi-D-coder>`_
134+
135+
- Added `.sum1() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.sum1>`_
136+
and `.product1() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.product1>`_
137+
iterator methods that respectively try to return the sum and the product of
138+
the elements of an iterator **when it is not empty**, otherwise they return
139+
``None``
140+
; by `@Emerentius <https://github.com/Emerentius>`_
141+
51142
- 0.8.0
52143

53144
- Added new adaptor ``.map_into()`` for conversions using ``Into`` by @vorner

0 commit comments

Comments
 (0)