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() {
218218 bar = foobar.into_iter().filter(|x| x % 2 == 0).collect();
219219}
220220
221- #[clippy::msrv = "1.70 "]
222- fn _msrv_170 () {
221+ #[clippy::msrv = "1.69 "]
222+ fn _msrv_169 () {
223223 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( );
225225}
226226
227227#[clippy::msrv = "1.52"]
Original file line number Diff line number Diff line change @@ -224,8 +224,8 @@ fn vec_deque_retain() {
224224 bar = foobar. into_iter ( ) . filter ( |x| x % 2 == 0 ) . collect ( ) ;
225225}
226226
227- #[ clippy:: msrv = "1.70 " ]
228- fn _msrv_170 ( ) {
227+ #[ clippy:: msrv = "1.69 " ]
228+ fn _msrv_169 ( ) {
229229 let mut binary_heap = BinaryHeap :: from ( [ 1 , 2 , 3 ] ) ;
230230 binary_heap = binary_heap. into_iter ( ) . filter ( |x| x % 2 == 0 ) . collect ( ) ;
231231}
Original file line number Diff line number Diff line change @@ -138,11 +138,5 @@ error: this expression can be written more simply using `.retain()`
138138LL | vec_deque = vec_deque.into_iter().filter(|x| x % 2 == 0).collect();
139139 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)`
140140
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
148142
You can’t perform that action at this time.
0 commit comments