@@ -22,8 +22,8 @@ LL | binary_heap = binary_heap.iter().filter(|&x| x % 2 == 0).cloned().colle
2222error: this expression can be written more simply using `.retain()`
2323 --> tests/ui/manual_retain.rs:34:5
2424 |
25- LL | tuples = tuples.iter().filter(|(ref x, ref y)| *x == 0).copied().collect();
26- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(ref x, ref y)| *x == 0)`
25+ LL | tuples = tuples.iter().filter(|&& (ref x, ref y)| *x == 0).copied().collect();
26+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|& (ref x, ref y)| *x == 0)`
2727
2828error: this expression can be written more simply using `.retain()`
2929 --> tests/ui/manual_retain.rs:36:5
@@ -74,8 +74,8 @@ LL | btree_set = btree_set.into_iter().filter(|x| x % 2 == 0).collect();
7474error: this expression can be written more simply using `.retain()`
7575 --> tests/ui/manual_retain.rs:106:5
7676 |
77- LL | tuples = tuples.iter().filter(|(ref x, ref y)| *x == 0).copied().collect();
78- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(ref x, ref y)| *x == 0)`
77+ LL | tuples = tuples.iter().filter(|&& (ref x, ref y)| *x == 0).copied().collect();
78+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|& (ref x, ref y)| *x == 0)`
7979
8080error: this expression can be written more simply using `.retain()`
8181 --> tests/ui/manual_retain.rs:108:5
@@ -126,8 +126,8 @@ LL | hash_set = hash_set.iter().filter(|&x| x % 2 == 0).cloned().collect();
126126error: this expression can be written more simply using `.retain()`
127127 --> tests/ui/manual_retain.rs:177:5
128128 |
129- LL | tuples = tuples.iter().filter(|(ref x, ref y)| *x == 0).copied().collect();
130- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(ref x, ref y)| *x == 0)`
129+ LL | tuples = tuples.iter().filter(|&& (ref x, ref y)| *x == 0).copied().collect();
130+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|& (ref x, ref y)| *x == 0)`
131131
132132error: this expression can be written more simply using `.retain()`
133133 --> tests/ui/manual_retain.rs:179:5
@@ -162,8 +162,8 @@ LL | vec = vec.into_iter().filter(|x| x % 2 == 0).collect();
162162error: this expression can be written more simply using `.retain()`
163163 --> tests/ui/manual_retain.rs:231:5
164164 |
165- LL | tuples = tuples.iter().filter(|(ref x, ref y)| *x == 0).copied().collect();
166- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|(ref x, ref y)| *x == 0)`
165+ LL | tuples = tuples.iter().filter(|&& (ref x, ref y)| *x == 0).copied().collect();
166+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `tuples.retain(|& (ref x, ref y)| *x == 0)`
167167
168168error: this expression can be written more simply using `.retain()`
169169 --> tests/ui/manual_retain.rs:233:5
0 commit comments