mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
Improve match statements
This commit is contained in:
parent
4698b366c4
commit
7d83f98ff3
1 changed files with 1 additions and 4 deletions
|
@ -31,10 +31,7 @@ fn option_as_ref_deref() {
|
|||
}
|
||||
|
||||
fn match_like_matches() {
|
||||
let _y = match Some(5) {
|
||||
Some(0) => true,
|
||||
_ => false,
|
||||
};
|
||||
let _y = matches!(Some(5), Some(0));
|
||||
}
|
||||
|
||||
fn match_same_arms() {
|
||||
|
|
Loading…
Reference in a new issue