@@ -140,97 +140,97 @@ LL | s = s.chars().filter(|&c| c != 'o').to_owned().collect();
140
140
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `s.retain(|c| c != 'o')`
141
141
142
142
error: this expression can be written more simply using `.retain()`
143
- --> $DIR/manual_retain.rs:203 :5
143
+ --> $DIR/manual_retain.rs:200 :5
144
144
|
145
145
LL | vec = vec.iter().filter(|&x| x % 2 == 0).copied().collect();
146
146
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| x % 2 == 0)`
147
147
148
148
error: this expression can be written more simply using `.retain()`
149
- --> $DIR/manual_retain.rs:204 :5
149
+ --> $DIR/manual_retain.rs:201 :5
150
150
|
151
151
LL | vec = vec.iter().filter(|&x| x % 2 == 0).cloned().collect();
152
152
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| x % 2 == 0)`
153
153
154
154
error: this expression can be written more simply using `.retain()`
155
- --> $DIR/manual_retain.rs:205 :5
155
+ --> $DIR/manual_retain.rs:202 :5
156
156
|
157
157
LL | vec = vec.into_iter().filter(|x| x % 2 == 0).collect();
158
158
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| x % 2 == 0)`
159
159
160
160
error: this expression can be written more simply using `.retain()`
161
- --> $DIR/manual_retain.rs:209 :5
161
+ --> $DIR/manual_retain.rs:206 :5
162
162
|
163
163
LL | tuples = tuples.iter().filter(|(ref x, ref y)| *x == 0).copied().collect();
164
164
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(ref x, ref y)| *x == 0)`
165
165
166
166
error: this expression can be written more simply using `.retain()`
167
- --> $DIR/manual_retain.rs:210 :5
167
+ --> $DIR/manual_retain.rs:207 :5
168
168
|
169
169
LL | tuples = tuples.iter().filter(|(x, y)| *x == 0).copied().collect();
170
170
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(x, y)| *x == 0)`
171
171
172
172
error: this expression can be written more simply using `.retain()`
173
- --> $DIR/manual_retain.rs:232 :5
173
+ --> $DIR/manual_retain.rs:229 :5
174
174
|
175
175
LL | vec_deque = vec_deque.iter().filter(|&x| x % 2 == 0).copied().collect();
176
176
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)`
177
177
178
178
error: this expression can be written more simply using `.retain()`
179
- --> $DIR/manual_retain.rs:233 :5
179
+ --> $DIR/manual_retain.rs:230 :5
180
180
|
181
181
LL | vec_deque = vec_deque.iter().filter(|&x| x % 2 == 0).cloned().collect();
182
182
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)`
183
183
184
184
error: this expression can be written more simply using `.retain()`
185
- --> $DIR/manual_retain.rs:234 :5
185
+ --> $DIR/manual_retain.rs:231 :5
186
186
|
187
187
LL | vec_deque = vec_deque.into_iter().filter(|x| x % 2 == 0).collect();
188
188
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)`
189
189
190
190
error: this expression can be written more simply using `.retain()`
191
- --> $DIR/manual_retain.rs:291 :5
191
+ --> $DIR/manual_retain.rs:288 :5
192
192
|
193
193
LL | vec = vec.into_iter().filter(|(x, y)| *x == 0).collect();
194
194
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|(x, y)| *x == 0)`
195
195
196
196
error: this expression can be written more simply using `.retain()`
197
- --> $DIR/manual_retain.rs:295 :5
197
+ --> $DIR/manual_retain.rs:292 :5
198
198
|
199
199
LL | tuples = tuples.into_iter().filter(|(_, n)| *n > 0).collect();
200
200
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(_, n)| *n > 0)`
201
201
202
202
error: this expression can be written more simply using `.retain()`
203
- --> $DIR/manual_retain.rs:302 :5
203
+ --> $DIR/manual_retain.rs:309 :5
204
204
|
205
205
LL | vec = vec.iter().filter(|&&x| x == 0).copied().collect();
206
206
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|&x| x == 0)`
207
207
208
208
error: this expression can be written more simply using `.retain()`
209
- --> $DIR/manual_retain.rs:303 :5
209
+ --> $DIR/manual_retain.rs:310 :5
210
210
|
211
211
LL | vec = vec.iter().filter(|&&x| x == 0).cloned().collect();
212
212
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|&x| x == 0)`
213
213
214
214
error: this expression can be written more simply using `.retain()`
215
- --> $DIR/manual_retain.rs:304 :5
215
+ --> $DIR/manual_retain.rs:311 :5
216
216
|
217
217
LL | vec = vec.into_iter().filter(|&x| x == 0).collect();
218
218
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|&x| x == 0)`
219
219
220
220
error: this expression can be written more simply using `.retain()`
221
- --> $DIR/manual_retain.rs:307 :5
221
+ --> $DIR/manual_retain.rs:314 :5
222
222
|
223
223
LL | vec = vec.iter().filter(|&x| *x == 0).copied().collect();
224
224
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| *x == 0)`
225
225
226
226
error: this expression can be written more simply using `.retain()`
227
- --> $DIR/manual_retain.rs:308 :5
227
+ --> $DIR/manual_retain.rs:315 :5
228
228
|
229
229
LL | vec = vec.iter().filter(|&x| *x == 0).cloned().collect();
230
230
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| *x == 0)`
231
231
232
232
error: this expression can be written more simply using `.retain()`
233
- --> $DIR/manual_retain.rs:309 :5
233
+ --> $DIR/manual_retain.rs:316 :5
234
234
|
235
235
LL | vec = vec.into_iter().filter(|x| *x == 0).collect();
236
236
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| *x == 0)`
0 commit comments