Skip to content

Commit 9016044

Browse files
committed
tests: Fix warnings from clippy::match_like_matches_macro
1 parent 06dfcb5 commit 9016044

2 files changed

Lines changed: 3 additions & 12 deletions

File tree

graph/src/schema/api.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1778,10 +1778,7 @@ mod tests {
17781778
let change_block_filter = user_filter_type
17791779
.fields
17801780
.iter()
1781-
.find(move |p| match p.name.as_str() {
1782-
"_change_block" => true,
1783-
_ => false,
1784-
})
1781+
.find(|p| p.name == "_change_block")
17851782
.expect("_change_block field is missing in User_filter");
17861783

17871784
match &change_block_filter.value_type {
@@ -1904,10 +1901,7 @@ mod tests {
19041901
let change_block_filter = user_filter_type
19051902
.fields
19061903
.iter()
1907-
.find(move |p| match p.name.as_str() {
1908-
"_change_block" => true,
1909-
_ => false,
1910-
})
1904+
.find(|p| p.name == "_change_block")
19111905
.expect("_change_block field is missing in User_filter");
19121906

19131907
match &change_block_filter.value_type {

tests/tests/integration_tests.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ pub struct TestResult {
5252

5353
impl TestResult {
5454
pub fn success(&self) -> bool {
55-
match self.status {
56-
TestStatus::Ok => true,
57-
_ => false,
58-
}
55+
matches!(self.status, TestStatus::Ok)
5956
}
6057

6158
fn print_subgraph(&self) {

0 commit comments

Comments
 (0)