Skip to content
This repository was archived by the owner on Aug 15, 2021. It is now read-only.

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

Merged
merged 1 commit into from
Nov 2, 2019
Merged

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

merged 1 commit into from
Nov 2, 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.
@pyfisch
Copy link
Owner

pyfisch commented Nov 2, 2019

Thank you!

@pyfisch pyfisch merged commit 5d83e67 into pyfisch:master Nov 2, 2019
@LukasKalbertodt
Copy link
Contributor Author

@pyfisch Not to rush anyone, but could this change be released as 0.10.3? Lots of crates depend on this one, so getting this fix out soon would be great :)

@pyfisch
Copy link
Owner

pyfisch commented Nov 23, 2019

Done.

But I doubt that this will help much as many crates still depend on v0.9 and some even on v0.8 and earlier releases.

@LukasKalbertodt
Copy link
Contributor Author

@pyfisch Thanks a bunch!

Unfortunately, I was not particularly smart regarding this PR. The same happened for itertools. This PR only fixes tests and when users depend on this crate, these tests are not compiled. So indeed not a single user crate regressed because of this crate. This is good in a sense, but also bad since I caused you unnecessary work and a useless release. I am truly sorry for that!

At least we are completely done here now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants