aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/parsing
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-06-28 23:37:25 +0100
committerGitHub <[email protected]>2020-06-28 23:37:25 +0100
commitca31b1d63ae91a69f1ce9c0b075403834ba19f38 (patch)
treedf719c1ccd7cbd174b79ca50ffd0052731d1ea86 /crates/ra_syntax/src/parsing
parent11f31ae4c3a38831609e4591e751ce10c4e38daf (diff)
parent36128c170d9d938cfcc52bc851aaed1fab6a2ad9 (diff)
Merge #5105
5105: Simlify with matches!() r=matklad a=Veetaha Co-authored-by: Veetaha <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/parsing')
-rw-r--r--crates/ra_syntax/src/parsing/reparsing.rs5
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
122fn is_contextual_kw(text: &str) -> bool { 122fn 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
129fn find_reparsable_node(node: &SyntaxNode, range: TextRange) -> Option<(SyntaxNode, Reparser)> { 126fn find_reparsable_node(node: &SyntaxNode, range: TextRange) -> Option<(SyntaxNode, Reparser)> {