File tree Expand file tree Collapse file tree 3 files changed +6
-12
lines changed Expand file tree Collapse file tree 3 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -218,10 +218,10 @@ fn vec_deque_retain() {
218
218
bar = foobar.into_iter().filter(|x| x % 2 == 0).collect();
219
219
}
220
220
221
- #[clippy::msrv = "1.70 "]
222
- fn _msrv_170 () {
221
+ #[clippy::msrv = "1.69 "]
222
+ fn _msrv_169 () {
223
223
let mut binary_heap = BinaryHeap::from([1, 2, 3]);
224
- binary_heap.retain( |x| x % 2 == 0);
224
+ binary_heap = binary_heap.into_iter().filter( |x| x % 2 == 0).collect( );
225
225
}
226
226
227
227
#[clippy::msrv = "1.52"]
Original file line number Diff line number Diff line change @@ -224,8 +224,8 @@ fn vec_deque_retain() {
224
224
bar = foobar. into_iter ( ) . filter ( |x| x % 2 == 0 ) . collect ( ) ;
225
225
}
226
226
227
- #[ clippy:: msrv = "1.70 " ]
228
- fn _msrv_170 ( ) {
227
+ #[ clippy:: msrv = "1.69 " ]
228
+ fn _msrv_169 ( ) {
229
229
let mut binary_heap = BinaryHeap :: from ( [ 1 , 2 , 3 ] ) ;
230
230
binary_heap = binary_heap. into_iter ( ) . filter ( |x| x % 2 == 0 ) . collect ( ) ;
231
231
}
Original file line number Diff line number Diff line change @@ -138,11 +138,5 @@ error: this expression can be written more simply using `.retain()`
138
138
LL | vec_deque = vec_deque.into_iter().filter(|x| x % 2 == 0).collect();
139
139
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)`
140
140
141
- error: this expression can be written more simply using `.retain()`
142
- --> $DIR/manual_retain.rs:230:5
143
- |
144
- LL | binary_heap = binary_heap.into_iter().filter(|x| x % 2 == 0).collect();
145
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `binary_heap.retain(|x| x % 2 == 0)`
146
-
147
- error: aborting due to 23 previous errors
141
+ error: aborting due to 22 previous errors
148
142
You can’t perform that action at this time.
0 commit comments