diff options
author | Veetaha <[email protected]> | 2020-06-28 02:02:03 +0100 |
---|---|---|
committer | Veetaha <[email protected]> | 2020-06-28 02:03:59 +0100 |
commit | e75e2ae5b6b6b1364368ceb3d4081b6508b2f001 (patch) | |
tree | e88a9920a908bfdf66c156ab582ce90d77d55c2f /crates/ra_ide_db/src | |
parent | 513924a7e01ef81a03869249c902daf148439736 (diff) |
Simlify with matches!()
Diffstat (limited to 'crates/ra_ide_db/src')
-rw-r--r-- | crates/ra_ide_db/src/symbol_index.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs index 6929055b2..5a09e7d1d 100644 --- a/crates/ra_ide_db/src/symbol_index.rs +++ b/crates/ra_ide_db/src/symbol_index.rs | |||
@@ -346,10 +346,7 @@ impl Query { | |||
346 | } | 346 | } |
347 | 347 | ||
348 | fn is_type(kind: SyntaxKind) -> bool { | 348 | fn is_type(kind: SyntaxKind) -> bool { |
349 | match kind { | 349 | matches!(kind, STRUCT_DEF | ENUM_DEF | TRAIT_DEF | TYPE_ALIAS_DEF) |
350 | STRUCT_DEF | ENUM_DEF | TRAIT_DEF | TYPE_ALIAS_DEF => true, | ||
351 | _ => false, | ||
352 | } | ||
353 | } | 350 | } |
354 | 351 | ||
355 | /// The actual data that is stored in the index. It should be as compact as | 352 | /// The actual data that is stored in the index. It should be as compact as |