Skip to content

Commit

Permalink
Fix clippy::match_like_matches_macro warning in test
Browse files Browse the repository at this point in the history
```
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
```
  • Loading branch information
taiki-e committed Jul 17, 2022
1 parent a07d169 commit 38a76dc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/barrier.rs
Expand Up @@ -29,10 +29,7 @@ fn smoke() {
// At this point, all spawned threads should be blocked,
// so we shouldn't get anything from the cahnnel.
let res = rx.try_recv();
assert!(match res {
Err(_err) => true,
_ => false,
});
assert!(res.is_err());

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

Expand Down

0 comments on commit 38a76dc

Please sign in to comment.