Skip to content

Commit 38a76dc

Browse files
committed
Fix clippy::match_like_matches_macro warning in test
``` warning: match expression looks like `matches!` macro --> tests/barrier.rs:32:21 | 32 | assert!(match res { | _____________________^ 33 | | Err(_err) => true, 34 | | _ => false, 35 | | }); | |_____________^ help: try this: `matches!(res, Err(_err))` | = note: `#[warn(clippy::match_like_matches_macro)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro ```
1 parent a07d169 commit 38a76dc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tests/barrier.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ fn smoke() {
2929
// At this point, all spawned threads should be blocked,
3030
// so we shouldn't get anything from the cahnnel.
3131
let res = rx.try_recv();
32-
assert!(match res {
33-
Err(_err) => true,
34-
_ => false,
35-
});
32+
assert!(res.is_err());
3633

3734
let mut leader_found = barrier.wait().await.is_leader();
3835

0 commit comments

Comments
 (0)