@@ -140,97 +140,97 @@ LL | s = s.chars().filter(|&c| c != 'o').to_owned().collect();
140140 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `s.retain(|c| c != 'o')`
141141
142142error: this expression can be written more simply using `.retain()`
143- --> $DIR/manual_retain.rs:203 :5
143+ --> $DIR/manual_retain.rs:200 :5
144144 |
145145LL | vec = vec.iter().filter(|&x| x % 2 == 0).copied().collect();
146146 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| x % 2 == 0)`
147147
148148error: this expression can be written more simply using `.retain()`
149- --> $DIR/manual_retain.rs:204 :5
149+ --> $DIR/manual_retain.rs:201 :5
150150 |
151151LL | vec = vec.iter().filter(|&x| x % 2 == 0).cloned().collect();
152152 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| x % 2 == 0)`
153153
154154error: this expression can be written more simply using `.retain()`
155- --> $DIR/manual_retain.rs:205 :5
155+ --> $DIR/manual_retain.rs:202 :5
156156 |
157157LL | vec = vec.into_iter().filter(|x| x % 2 == 0).collect();
158158 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| x % 2 == 0)`
159159
160160error: this expression can be written more simply using `.retain()`
161- --> $DIR/manual_retain.rs:209 :5
161+ --> $DIR/manual_retain.rs:206 :5
162162 |
163163LL | tuples = tuples.iter().filter(|(ref x, ref y)| *x == 0).copied().collect();
164164 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(ref x, ref y)| *x == 0)`
165165
166166error: this expression can be written more simply using `.retain()`
167- --> $DIR/manual_retain.rs:210 :5
167+ --> $DIR/manual_retain.rs:207 :5
168168 |
169169LL | tuples = tuples.iter().filter(|(x, y)| *x == 0).copied().collect();
170170 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(x, y)| *x == 0)`
171171
172172error: this expression can be written more simply using `.retain()`
173- --> $DIR/manual_retain.rs:232 :5
173+ --> $DIR/manual_retain.rs:229 :5
174174 |
175175LL | vec_deque = vec_deque.iter().filter(|&x| x % 2 == 0).copied().collect();
176176 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)`
177177
178178error: this expression can be written more simply using `.retain()`
179- --> $DIR/manual_retain.rs:233 :5
179+ --> $DIR/manual_retain.rs:230 :5
180180 |
181181LL | vec_deque = vec_deque.iter().filter(|&x| x % 2 == 0).cloned().collect();
182182 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)`
183183
184184error: this expression can be written more simply using `.retain()`
185- --> $DIR/manual_retain.rs:234 :5
185+ --> $DIR/manual_retain.rs:231 :5
186186 |
187187LL | vec_deque = vec_deque.into_iter().filter(|x| x % 2 == 0).collect();
188188 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)`
189189
190190error: this expression can be written more simply using `.retain()`
191- --> $DIR/manual_retain.rs:291 :5
191+ --> $DIR/manual_retain.rs:288 :5
192192 |
193193LL | vec = vec.into_iter().filter(|(x, y)| *x == 0).collect();
194194 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|(x, y)| *x == 0)`
195195
196196error: this expression can be written more simply using `.retain()`
197- --> $DIR/manual_retain.rs:295 :5
197+ --> $DIR/manual_retain.rs:292 :5
198198 |
199199LL | tuples = tuples.into_iter().filter(|(_, n)| *n > 0).collect();
200200 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(_, n)| *n > 0)`
201201
202202error: this expression can be written more simply using `.retain()`
203- --> $DIR/manual_retain.rs:302 :5
203+ --> $DIR/manual_retain.rs:309 :5
204204 |
205205LL | vec = vec.iter().filter(|&&x| x == 0).copied().collect();
206206 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|&x| x == 0)`
207207
208208error: this expression can be written more simply using `.retain()`
209- --> $DIR/manual_retain.rs:303 :5
209+ --> $DIR/manual_retain.rs:310 :5
210210 |
211211LL | vec = vec.iter().filter(|&&x| x == 0).cloned().collect();
212212 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|&x| x == 0)`
213213
214214error: this expression can be written more simply using `.retain()`
215- --> $DIR/manual_retain.rs:304 :5
215+ --> $DIR/manual_retain.rs:311 :5
216216 |
217217LL | vec = vec.into_iter().filter(|&x| x == 0).collect();
218218 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|&x| x == 0)`
219219
220220error: this expression can be written more simply using `.retain()`
221- --> $DIR/manual_retain.rs:307 :5
221+ --> $DIR/manual_retain.rs:314 :5
222222 |
223223LL | vec = vec.iter().filter(|&x| *x == 0).copied().collect();
224224 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| *x == 0)`
225225
226226error: this expression can be written more simply using `.retain()`
227- --> $DIR/manual_retain.rs:308 :5
227+ --> $DIR/manual_retain.rs:315 :5
228228 |
229229LL | vec = vec.iter().filter(|&x| *x == 0).cloned().collect();
230230 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| *x == 0)`
231231
232232error: this expression can be written more simply using `.retain()`
233- --> $DIR/manual_retain.rs:309 :5
233+ --> $DIR/manual_retain.rs:316 :5
234234 |
235235LL | vec = vec.into_iter().filter(|x| *x == 0).collect();
236236 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec.retain(|x| *x == 0)`
0 commit comments