Skip to content

Commit

Permalink
fix: change msrv to 1.69 for binary heap
Browse files Browse the repository at this point in the history
  • Loading branch information
unvalley committed Aug 13, 2023
1 parent d5dbee4 commit 1eff39d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 3 additions & 3 deletions tests/ui/manual_retain.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/manual_retain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
8 changes: 1 addition & 7 deletions tests/ui/manual_retain.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1eff39d

Please sign in to comment.