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

Merged
merged 1 commit into from
Dec 23, 2019
Merged

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

merged 1 commit into from
Dec 23, 2019

Conversation

starfys
Copy link
Contributor

@starfys starfys commented Oct 30, 2019

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.
@starfys
Copy link
Contributor Author

starfys commented Oct 30, 2019

The Travis CI build reports a failure on nightly, but it seems to be a timeout? I built on nightly locally and it seems to compile fine.

@codyps
Copy link
Owner

codyps commented Dec 23, 2019

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 23, 2019

This PR was included in a batch with a merge conflict, it will be automatically retried

1 similar comment
@bors
Copy link
Contributor

bors bot commented Dec 23, 2019

This PR was included in a batch with a merge conflict, it will be automatically retried

bors bot added a commit that referenced this pull request Dec 23, 2019
84: Use `slice::iter` instead of `into_iter` to avoid future breakage r=jmesmon a=starfys

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.


Co-authored-by: Steven Sheffey <stevensheffey4@gmail.com>
@bors
Copy link
Contributor

bors bot commented Dec 23, 2019

Build succeeded

@bors bors bot merged commit e212eef into codyps:master Dec 23, 2019
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