Skip to content
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

Use slice::iter instead of into_iter to avoid future breakage #378

Merged
merged 1 commit into from Oct 30, 2019
Merged

Use slice::iter instead of into_iter to avoid future breakage #378

merged 1 commit into from Oct 30, 2019

Conversation

LukasKalbertodt
Copy link
Contributor

an_array.into_iter() currently just works because of the autoref
feature, which then calls <[T] as IntoIterator>::into_iter. But
in the future, arrays will implement IntoIterator, too. In order
to avoid problems in the future, the call is replaced by iter()
which is shorter and more explicit.

A crater run showed that your crate is affected by a potential future change. See rust-lang/rust#65819 for more information.

`an_array.into_iter()` currently just works because of the autoref
feature, which then calls `<[T] as IntoIterator>::into_iter`. But
in the future, arrays will implement `IntoIterator`, too. In order
to avoid problems in the future, the call is replaced by `iter()`
which is shorter and more explicit.
@jswrenn
Copy link
Member

jswrenn commented Oct 30, 2019

bors r+

bors bot added a commit that referenced this pull request Oct 30, 2019
378: Use `slice::iter` instead of `into_iter` to avoid future breakage r=jswrenn a=LukasKalbertodt

`an_array.into_iter()` currently just works because of the autoref
feature, which then calls `<[T] as IntoIterator>::into_iter`. But
in the future, arrays will implement `IntoIterator`, too. In order
to avoid problems in the future, the call is replaced by `iter()`
which is shorter and more explicit.

A crater run showed that your crate is affected by a potential future change. See rust-lang/rust#65819 for more information.

Co-authored-by: Lukas Kalbertodt <lukas.kalbertodt@gmail.com>
@bors
Copy link
Contributor

bors bot commented Oct 30, 2019

Build succeeded

@bors bors bot merged commit cb3c993 into rust-itertools:master Oct 30, 2019
@LukasKalbertodt
Copy link
Contributor Author

Not to be rushing anyone, but would it be possible to release this as 0.8.2? Lots of crates are depending on itertools and having this fix out in the wild as soon as possible would be a good thing :)

@jswrenn
Copy link
Member

jswrenn commented Nov 23, 2019

Done! Sorry for the delay.

Since the affected code is part of a benchmark, would this breakage actually affect library users?

@LukasKalbertodt

This comment has been minimized.

@LukasKalbertodt
Copy link
Contributor Author

Okay, I have understood the situation. Finally.

My root regression analysis never actually checked how many regressions a particular root regression caused, but just sorted by reverse dependencies. I just adjusted the analysis to account for that (which I should have done already some time ago). And it turns out: no regressions are caused by itertools. So yes, it was just in the benchmark and at no time, users of this crate were affected by this. So we are done here.

Again, please excuse my hastily actions and that I asked you to release a new version without properly checking if it is worth anything. I'm very sorry and try to be more careful in the future!

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.

None yet

2 participants