Skip to content

make Extend use IntoIterator#22489

Closed
Gankra wants to merge 2 commits into
rust-lang:masterfrom
Gankra:into_iter
Closed

make Extend use IntoIterator#22489
Gankra wants to merge 2 commits into
rust-lang:masterfrom
Gankra:into_iter

Conversation

@Gankra

@Gankra Gankra commented Feb 18, 2015

Copy link
Copy Markdown
Contributor

This breaks all implementors of Extend, who now must take IntoIterator rather than Iterator. Fixing implementations is completely trivial, though. Users of extend are unaffected, as all Iterators are IntoIterator.

[breaking-change]

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@nikomatsakis

Copy link
Copy Markdown
Contributor

@bors r+ de9bbf9

@Gankra

Gankra commented Feb 18, 2015

Copy link
Copy Markdown
Contributor Author

@bors r- (adding other stuff)

This breaks all implementors of Extend, as they must now accept IntoIterator instead of Iterator. The fix for this is generally trivial (change the bound, and maybe call into_iter() on the argument to get the old argument).

Users of Extend should be unaffected because Iterators are IntoIterator.

[breaking-change]
This breaks all implementors of FromIterator, as they must now accept IntoIterator instead of Iterator. The fix for this is generally trivial (change the bound, and maybe call into_iter() on the argument to get the old argument).

Users of FromIterator should be unaffected because Iterators are IntoIterator.

[breaking-change]
@Gankra

Gankra commented Feb 18, 2015

Copy link
Copy Markdown
Contributor Author

@aturon is merging into a collections mega-PR

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.

3 participants