diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-28 23:37:25 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-28 23:37:25 +0100 |
commit | ca31b1d63ae91a69f1ce9c0b075403834ba19f38 (patch) | |
tree | df719c1ccd7cbd174b79ca50ffd0052731d1ea86 /crates/ra_syntax/src/ast/expr_extensions.rs | |
parent | 11f31ae4c3a38831609e4591e751ce10c4e38daf (diff) | |
parent | 36128c170d9d938cfcc52bc851aaed1fab6a2ad9 (diff) |
Merge #5105
5105: Simlify with matches!() r=matklad a=Veetaha
Co-authored-by: Veetaha <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/ast/expr_extensions.rs')
-rw-r--r-- | crates/ra_syntax/src/ast/expr_extensions.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/ast/expr_extensions.rs b/crates/ra_syntax/src/ast/expr_extensions.rs index 7771d6759..db5438d68 100644 --- a/crates/ra_syntax/src/ast/expr_extensions.rs +++ b/crates/ra_syntax/src/ast/expr_extensions.rs | |||
@@ -399,10 +399,7 @@ impl ast::BlockExpr { | |||
399 | Some(it) => it, | 399 | Some(it) => it, |
400 | None => return true, | 400 | None => return true, |
401 | }; | 401 | }; |
402 | match parent.kind() { | 402 | !matches!(parent.kind(), FN_DEF | IF_EXPR | WHILE_EXPR | LOOP_EXPR | EFFECT_EXPR) |
403 | FN_DEF | IF_EXPR | WHILE_EXPR | LOOP_EXPR | EFFECT_EXPR => false, | ||
404 | _ => true, | ||
405 | } | ||
406 | } | 403 | } |
407 | } | 404 | } |
408 | 405 | ||