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 #48

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

z2oh
Copy link
Contributor

@z2oh z2oh commented Oct 30, 2019

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.
@coveralls
Copy link

coveralls commented Oct 30, 2019

Coverage Status

Coverage decreased (-0.3%) to 93.093% when pulling 12bb695 on z2oh:master into dc11fcc on shnewto:master.

@shnewto
Copy link
Owner

shnewto commented Oct 30, 2019

That's really good to know! 👀

Thanks a ton for helping out and making a PR!

@shnewto shnewto merged commit 6f4e052 into shnewto:master Oct 30, 2019
shnewto added a commit that referenced this pull request Jul 29, 2020
Use `slice::iter` instead of `into_iter` to avoid future breakage
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