fix: change msrv to 1.69 for binary heap

This commit is contained in:
unvalley 2023-08-13 22:52:06 +09:00
parent d5dbee4aa0
commit 1eff39ddb6
3 changed files with 6 additions and 12 deletions

View file

@ -218,10 +218,10 @@ fn vec_deque_retain() {
bar = foobar.into_iter().filter(|x| x % 2 == 0).collect();
}
#[clippy::msrv = "1.70"]
fn _msrv_170() {
#[clippy::msrv = "1.69"]
fn _msrv_169() {
let mut binary_heap = BinaryHeap::from([1, 2, 3]);
binary_heap.retain(|x| x % 2 == 0);
binary_heap = binary_heap.into_iter().filter(|x| x % 2 == 0).collect();
}
#[clippy::msrv = "1.52"]

View file

@ -224,8 +224,8 @@ fn vec_deque_retain() {
bar = foobar.into_iter().filter(|x| x % 2 == 0).collect();
}
#[clippy::msrv = "1.70"]
fn _msrv_170() {
#[clippy::msrv = "1.69"]
fn _msrv_169() {
let mut binary_heap = BinaryHeap::from([1, 2, 3]);
binary_heap = binary_heap.into_iter().filter(|x| x % 2 == 0).collect();
}

View file

@ -138,11 +138,5 @@ error: this expression can be written more simply using `.retain()`
LL | vec_deque = vec_deque.into_iter().filter(|x| x % 2 == 0).collect();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `vec_deque.retain(|x| x % 2 == 0)`
error: this expression can be written more simply using `.retain()`
--> $DIR/manual_retain.rs:230:5
|
LL | binary_heap = binary_heap.into_iter().filter(|x| x % 2 == 0).collect();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `binary_heap.retain(|x| x % 2 == 0)`
error: aborting due to 23 previous errors
error: aborting due to 22 previous errors