@@ -61,6 +61,7 @@ error: the loop variable `i` is only used to index `vec2`
61
61
LL | for i in 0..vec.len() {
62
62
| ^^^^^^^^^^^^
63
63
|
64
+ = note: suggestion might skip expected iterations if `vec2.iter().count()` is less than `vec.len()`
64
65
help: consider using an iterator
65
66
|
66
67
LL | for <item> in vec2.iter().take(vec.len()) {
@@ -72,6 +73,7 @@ error: the loop variable `i` is only used to index `vec`
72
73
LL | for i in 5..vec.len() {
73
74
| ^^^^^^^^^^^^
74
75
|
76
+ = note: suggestion might skip expected iterations if `vec.iter().count()` is less than `5`
75
77
help: consider using an iterator
76
78
|
77
79
LL | for <item> in vec.iter().skip(5) {
@@ -83,6 +85,7 @@ error: the loop variable `i` is only used to index `vec`
83
85
LL | for i in 0..MAX_LEN {
84
86
| ^^^^^^^^^^
85
87
|
88
+ = note: suggestion might skip expected iterations if `vec.iter().count()` is less than `MAX_LEN`
86
89
help: consider using an iterator
87
90
|
88
91
LL | for <item> in vec.iter().take(MAX_LEN) {
@@ -94,6 +97,7 @@ error: the loop variable `i` is only used to index `vec`
94
97
LL | for i in 0..=MAX_LEN {
95
98
| ^^^^^^^^^^^
96
99
|
100
+ = note: suggestion might skip expected iterations if `vec.iter().count()` is less than `MAX_LEN + 1`
97
101
help: consider using an iterator
98
102
|
99
103
LL | for <item> in vec.iter().take(MAX_LEN + 1) {
@@ -105,6 +109,7 @@ error: the loop variable `i` is only used to index `vec`
105
109
LL | for i in 5..10 {
106
110
| ^^^^^
107
111
|
112
+ = note: suggestion might skip expected iterations if `vec.iter().count()` is less than `5` or `10`
108
113
help: consider using an iterator
109
114
|
110
115
LL | for <item> in vec.iter().take(10).skip(5) {
@@ -116,6 +121,7 @@ error: the loop variable `i` is only used to index `vec`
116
121
LL | for i in 5..=10 {
117
122
| ^^^^^^
118
123
|
124
+ = note: suggestion might skip expected iterations if `vec.iter().count()` is less than `5` or `10 + 1`
119
125
help: consider using an iterator
120
126
|
121
127
LL | for <item> in vec.iter().take(10 + 1).skip(5) {
@@ -127,6 +133,7 @@ error: the loop variable `i` is used to index `vec`
127
133
LL | for i in 5..vec.len() {
128
134
| ^^^^^^^^^^^^
129
135
|
136
+ = note: suggestion might skip expected iterations if `vec.iter().count()` is less than `5`
130
137
help: consider using an iterator and enumerate()
131
138
|
132
139
LL | for (i, <item>) in vec.iter().enumerate().skip(5) {
@@ -138,6 +145,7 @@ error: the loop variable `i` is used to index `vec`
138
145
LL | for i in 5..10 {
139
146
| ^^^^^
140
147
|
148
+ = note: suggestion might skip expected iterations if `vec.iter().count()` is less than `5` or `10`
141
149
help: consider using an iterator and enumerate()
142
150
|
143
151
LL | for (i, <item>) in vec.iter().enumerate().take(10).skip(5) {
0 commit comments