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_syntax/src/parsing | |
parent | 513924a7e01ef81a03869249c902daf148439736 (diff) |
Simlify with matches!()
Diffstat (limited to 'crates/ra_syntax/src/parsing')
-rw-r--r-- | crates/ra_syntax/src/parsing/reparsing.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/parsing/reparsing.rs b/crates/ra_syntax/src/parsing/reparsing.rs index edbc190f8..ed5a42ea3 100644 --- a/crates/ra_syntax/src/parsing/reparsing.rs +++ b/crates/ra_syntax/src/parsing/reparsing.rs | |||
@@ -120,10 +120,7 @@ fn get_text_after_edit(element: SyntaxElement, edit: &Indel) -> String { | |||
120 | } | 120 | } |
121 | 121 | ||
122 | fn is_contextual_kw(text: &str) -> bool { | 122 | fn is_contextual_kw(text: &str) -> bool { |
123 | match text { | 123 | matches!(text, "auto" | "default" | "union") |
124 | "auto" | "default" | "union" => true, | ||
125 | _ => false, | ||
126 | } | ||
127 | } | 124 | } |
128 | 125 | ||
129 | fn find_reparsable_node(node: &SyntaxNode, range: TextRange) -> Option<(SyntaxNode, Reparser)> { | 126 | fn find_reparsable_node(node: &SyntaxNode, range: TextRange) -> Option<(SyntaxNode, Reparser)> { |