You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR updates the versions in our build and release pipelines to use Rust 1.80.
When fixing the new clippy lints to satisfy 1.80, we get some errors in the build pipeline.
All of the errors are related to the fact that rust 1.80 implements Iterator for &Box<[...]>. So, what before had to be written as for elt in container.iter() now can be written as for elt in container which is more concise, and clippy enforces this new style.
for elt in &**container happens to be equivalent and it works both in rust 1.78 and rust 1.80, and clippy doesn't complain about it in either.
This PR changes all the instances of for elt in container.iter() where container is a &Box<[...]> to for elt in &**container so we can update the rust version to 1.80. There will be a subsequent PR that changes all the instances of for elt in &**container to for elt in container.
Based on the description of the PR, why not just updated all instances of for elt in container.iter() where container is a &Box<[...]> to for elt in container instead of for elt in &**container?
Based on the description of the PR, why not just updated all instances of for elt in container.iter() where container is a &Box<[...]> to for elt in container instead of for elt in &**container?
Because our current pipeline is built using rust 1.78 and impl<T> Iterator for Box<[T]> was introduced in rust 1.80. So, for elt in container issues a compile error in the current build pipeline.
PR #1805 changed all instances of `for elt in container.iter()` where
container was a `&Box<[...]>` to `for elt in &**container`, which is
equivalent, to be able to update our build and release pipelines to rust
1.80, you can see the full explanation there.
This is a subsequent PR that changes:
- All instances of `for elt in &**container` to `for elt in container`.
- All instances of `for elt in &*container` to `for elt in &container`.
These changes are due to rust 1.80 implementing `Iterator` for
`Box<[...]>` and clippy enforcing a new style of iteration.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the versions in our build and release pipelines to use Rust 1.80.
When fixing the new clippy lints to satisfy 1.80, we get some errors in the build pipeline.
All of the errors are related to the fact that rust 1.80 implements Iterator for
&Box<[...]>
. So, what before had to be written asfor elt in container.iter()
now can be written asfor elt in container
which is more concise, and clippy enforces this new style.for elt in &**container
happens to be equivalent and it works both in rust 1.78 and rust 1.80, and clippy doesn't complain about it in either.This PR changes all the instances of
for elt in container.iter()
where container is a&Box<[...]>
tofor elt in &**container
so we can update the rust version to 1.80. There will be a subsequent PR that changes all the instances offor elt in &**container
tofor elt in container
.