Skip to content

Upgrading itertools 0.7 to 0.8

Breaking0.7.11 → 0.8.2Breaking3Platform1Deprecated4New7Changed4Other1

BreakingUpgrade verdict

3 breaking changes and a platform requirement change.

  • The library's own flatten method is gone; use the standard library version instead.
  • Code that expected a list back from this sorting method now gets a lazy iterator instead.
  • Changes the return type of the two-argument izip!(x, y) macro to the usual Iterator::zip.
  • Projects must build with Rust 1.24 or newer.
Top 5 of 8 that need code or config changes

Adds rand ^0.6.

Installs 25 packages in all (was 13).

Breaking3
Removes .flatten() in favour of std's .flatten().
.flatten()
Changes the return type of .sorted_by_by_key() from a Vec to an iterator.
.sorted_by_by_key()
Changes the return type of the two-argument izip!(x, y) macro to the usual Iterator::zip.
izip!Iterator::zip
Platform1
Requires Rust 1.24 as the minimum supported version.
Deprecated4
Deprecates .foreach() in favour of std's .for_each().
.foreach().for_each()
Deprecates .step() in favour of std's .step_by().
.step().step_by()
Deprecates repeat_call in favour of std's repeat_with.
repeat_callrepeat_with
Deprecates .fold_while() in favour of std's .try_fold().
.fold_while().try_fold()