mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 13:43:17 +00:00
bless
This commit is contained in:
parent
3b225e3a96
commit
5ed191de6b
1 changed files with 4 additions and 4 deletions
|
@ -49,7 +49,7 @@ error: the loop variable `i` is used to index `vec`
|
||||||
LL | for i in 0..vec.len() {
|
LL | for i in 0..vec.len() {
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
help: consider using an iterator and enumerate
|
help: consider using an iterator and enumerate()
|
||||||
|
|
|
|
||||||
LL | for (i, <item>) in vec.iter().enumerate() {
|
LL | for (i, <item>) in vec.iter().enumerate() {
|
||||||
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
|
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -126,7 +126,7 @@ error: the loop variable `i` is used to index `vec`
|
||||||
LL | for i in 5..vec.len() {
|
LL | for i in 5..vec.len() {
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
help: consider using an iterator and enumerate
|
help: consider using an iterator and enumerate()
|
||||||
|
|
|
|
||||||
LL | for (i, <item>) in vec.iter().enumerate().skip(5) {
|
LL | for (i, <item>) in vec.iter().enumerate().skip(5) {
|
||||||
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -137,7 +137,7 @@ error: the loop variable `i` is used to index `vec`
|
||||||
LL | for i in 5..10 {
|
LL | for i in 5..10 {
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
|
|
||||||
help: consider using an iterator and enumerate
|
help: consider using an iterator and enumerate()
|
||||||
|
|
|
|
||||||
LL | for (i, <item>) in vec.iter().enumerate().take(10).skip(5) {
|
LL | for (i, <item>) in vec.iter().enumerate().take(10).skip(5) {
|
||||||
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -148,7 +148,7 @@ error: the loop variable `i` is used to index `vec`
|
||||||
LL | for i in 0..vec.len() {
|
LL | for i in 0..vec.len() {
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
help: consider using an iterator and enumerate
|
help: consider using an iterator and enumerate()
|
||||||
|
|
|
|
||||||
LL | for (i, <item>) in vec.iter_mut().enumerate() {
|
LL | for (i, <item>) in vec.iter_mut().enumerate() {
|
||||||
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
Loading…
Reference in a new issue