[Merged by Bors] - Update codebase to use IntoIterator where possible.#5269
Closed
tim-blackbird wants to merge 1 commit intobevyengine:mainfrom
Closed
[Merged by Bors] - Update codebase to use IntoIterator where possible.#5269tim-blackbird wants to merge 1 commit intobevyengine:mainfrom
IntoIterator where possible.#5269tim-blackbird wants to merge 1 commit intobevyengine:mainfrom
Conversation
IntoIterator where possible.
BoxyUwU
reviewed
Jul 10, 2022
| .collect(); | ||
|
|
||
| let mut added_cameras = vec![]; | ||
| for entity in &mut queries.p1().iter() { |
Member
There was a problem hiding this comment.
lol thats an incredibly fun side effect of impl<T: Iterator> Iterator for &mut T
BoxyUwU
approved these changes
Jul 10, 2022
LoipesMas
approved these changes
Jul 10, 2022
Contributor
LoipesMas
left a comment
There was a problem hiding this comment.
No crypto miners found
TimJentzsch
reviewed
Jul 10, 2022
Contributor
TimJentzsch
left a comment
There was a problem hiding this comment.
I also didn't find any crypto miners, but two usages of iter() in doc comments. Maybe that's intentional though?
Member
|
No crypto miners as far as I can tell but if we want to be really sure we should review the entire dependency tree before merging this PR :) (sarcasm) |
TimJentzsch
approved these changes
Jul 10, 2022
IceSentry
approved these changes
Jul 10, 2022
mockersf
approved these changes
Jul 10, 2022
Member
mockersf
left a comment
There was a problem hiding this comment.
very clever to adda crypto miner, and then create all those obviously fake accounts to approve your PR
Member
|
bors r+ |
Contributor
|
Merge conflict. |
dac3fed to
3e7b798
Compare
Member
|
bors retry |
bors bot
pushed a commit
that referenced
this pull request
Jul 11, 2022
Remove unnecessary calls to `iter()`/`iter_mut()`.
Mainly updates the use of queries in our code, docs, and examples.
```rust
// From
for _ in list.iter() {
for _ in list.iter_mut() {
// To
for _ in &list {
for _ in &mut list {
```
We already enable the pedantic lint [clippy::explicit_iter_loop](https://rust-lang.github.io/rust-clippy/stable/) inside of Bevy. However, this only warns for a few known types from the standard library.
## Note for reviewers
As you can see the additions and deletions are exactly equal.
Maybe give it a quick skim to check I didn't sneak in a crypto miner, but you don't have to torture yourself by reading every line.
I already experienced enough pain making this PR :)
Co-authored-by: devil-ira <justthecooldude@gmail.com>
Contributor
IntoIterator where possible.IntoIterator where possible.
inodentry
pushed a commit
to IyesGames/bevy
that referenced
this pull request
Aug 8, 2022
Remove unnecessary calls to `iter()`/`iter_mut()`.
Mainly updates the use of queries in our code, docs, and examples.
```rust
// From
for _ in list.iter() {
for _ in list.iter_mut() {
// To
for _ in &list {
for _ in &mut list {
```
We already enable the pedantic lint [clippy::explicit_iter_loop](https://rust-lang.github.io/rust-clippy/stable/) inside of Bevy. However, this only warns for a few known types from the standard library.
## Note for reviewers
As you can see the additions and deletions are exactly equal.
Maybe give it a quick skim to check I didn't sneak in a crypto miner, but you don't have to torture yourself by reading every line.
I already experienced enough pain making this PR :)
Co-authored-by: devil-ira <justthecooldude@gmail.com>
james7132
pushed a commit
to james7132/bevy
that referenced
this pull request
Oct 28, 2022
Remove unnecessary calls to `iter()`/`iter_mut()`.
Mainly updates the use of queries in our code, docs, and examples.
```rust
// From
for _ in list.iter() {
for _ in list.iter_mut() {
// To
for _ in &list {
for _ in &mut list {
```
We already enable the pedantic lint [clippy::explicit_iter_loop](https://rust-lang.github.io/rust-clippy/stable/) inside of Bevy. However, this only warns for a few known types from the standard library.
## Note for reviewers
As you can see the additions and deletions are exactly equal.
Maybe give it a quick skim to check I didn't sneak in a crypto miner, but you don't have to torture yourself by reading every line.
I already experienced enough pain making this PR :)
Co-authored-by: devil-ira <justthecooldude@gmail.com>
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this pull request
Feb 1, 2023
Remove unnecessary calls to `iter()`/`iter_mut()`.
Mainly updates the use of queries in our code, docs, and examples.
```rust
// From
for _ in list.iter() {
for _ in list.iter_mut() {
// To
for _ in &list {
for _ in &mut list {
```
We already enable the pedantic lint [clippy::explicit_iter_loop](https://rust-lang.github.io/rust-clippy/stable/) inside of Bevy. However, this only warns for a few known types from the standard library.
## Note for reviewers
As you can see the additions and deletions are exactly equal.
Maybe give it a quick skim to check I didn't sneak in a crypto miner, but you don't have to torture yourself by reading every line.
I already experienced enough pain making this PR :)
Co-authored-by: devil-ira <justthecooldude@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Remove unnecessary calls to
iter()/iter_mut().Mainly updates the use of queries in our code, docs, and examples.
We already enable the pedantic lint clippy::explicit_iter_loop inside of Bevy. However, this only warns for a few known types from the standard library.
Note for reviewers
As you can see the additions and deletions are exactly equal.
Maybe give it a quick skim to check I didn't sneak in a crypto miner, but you don't have to torture yourself by reading every line.
I already experienced enough pain making this PR :)