Use array_iterator() over deprecated initalizer #42

Merged
bazaah merged 1 commits from feature/event/parser/use-into-iter into master 2022-03-26 15:49:51 +00:00
bazaah commented 2022-03-26 15:46:19 +00:00 (Migrated from github.com)

The deprecated function, std::array::IntoIter::new was previously used to work
around a hack in std where Rust editions < 2021 would keep the previous
behavior of automatically converting the call to take the array by reference.

The exception is if you explicitly call IntoIterator::into_iter() on an array,
in which case you "opt in" to the new behavior.

That's all we do here. Hopefully quieting down the spurious warnings in CI.

The deprecated function, `std::array::IntoIter::new` was previously used to work around a hack in `std` where Rust editions < 2021 would keep the previous behavior of automatically converting the call to take the array by reference. The exception is if you explicitly call `IntoIterator::into_iter()` on an array, in which case you "opt in" to the new behavior. That's all we do here. Hopefully quieting down the spurious warnings in CI.
Sign in to join this conversation.
No description provided.