Skip to content

Conversation

bluss
Copy link
Member

@bluss bluss commented Mar 4, 2018

This restores our travis to working order by not using .flatten() directly, since it is now incompatible with Rust nightly.

We introduce a free function flatten — similar to many other IntoIterator-enabled free functions we already have: https://docs.rs/itertools/0.7.6/itertools/#functions

The benefit of flatten as a free function is that we can support it from Rust 1.12.0 (version req right now) and for all the forseeable future. In a future version of itertools, this free function will be "upgraded" to use the std .flatten() iterator. The free function will remain while we will remove Itertools::flatten (unless std removes their version) in a future version.

Users that have compatibility problems with Itertools::flatten and its clash with Iterator::flatten, they can either use use itertools::Itertools; Itertools::flatten( expression ) or use itertools::flatten; flatten( expression ).

@bluss bluss merged commit b4cde06 into master Mar 4, 2018
@bluss bluss deleted the flatten-workarounds branch March 4, 2018 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant