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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

martin-fink
Copy link

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

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.
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

1 participant