Skip to content

0.8.1 release #376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "itertools"
version = "0.8.0"
version = "0.8.1"

license = "MIT/Apache-2.0"
repository = "https://github.com/bluss/rust-itertools"
Expand Down
91 changes: 91 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,97 @@ then it can't be accepted into ``libcore``, and you should propose it for ``iter
Recent Changes
--------------

- 0.8.1

- 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 <https://github.com/Xaeroxe>`_

- Added combinatory iterator adaptors:

- `.permutations(k) <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.permutations>`_:

``[0, 1, 2].iter().permutations(2)`` yields

.. code:: rust

[
vec![0, 1],
vec![0, 2],
vec![1, 0],
vec![1, 2],
vec![2, 0],
vec![2, 1],
]

; by `@tobz1000 <https://github.com/tobz1000>`_

- `.combinations_with_replacement(k) <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.combinations_with_replacement>`_:

``[0, 1, 2].iter().combinations_with_replacement(2)`` yields

.. code:: rust

[
vec![0, 0],
vec![0, 1],
vec![0, 2],
vec![1, 1],
vec![1, 2],
vec![2, 2],
]

; by `@tommilligan <https://github.com/tommilligan>`_

- For reference, these methods join the already existing
`.combinations(k) <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.combinations>`_:

``[0, 1, 2].iter().combinations(2)`` yields

.. code:: rust

[
vec![0, 1],
vec![0, 2],
vec![1, 2],
]

- 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 <https://github.com/jswrenn>`_

- 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 <https://github.com/phimuemue>`_

- Improved the performance of `.all_equal() <https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method.all_equal>`_
; by `@fyrchik <https://github.com/fyrchik>`_

- 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 <https://github.com/danielhenrymantilla>`_

- 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 <https://github.com/Avi-D-coder>`_

- 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 <https://github.com/Emerentius>`_

- 0.8.0

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