mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Simlify with matches!()
This commit is contained in:
parent
513924a7e0
commit
e75e2ae5b6
20 changed files with 32 additions and 98 deletions
|
@ -120,10 +120,7 @@ fn get_text_after_edit(element: SyntaxElement, edit: &Indel) -> String {
|
|||
}
|
||||
|
||||
fn is_contextual_kw(text: &str) -> bool {
|
||||
match text {
|
||||
"auto" | "default" | "union" => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(text, "auto" | "default" | "union")
|
||||
}
|
||||
|
||||
fn find_reparsable_node(node: &SyntaxNode, range: TextRange) -> Option<(SyntaxNode, Reparser)> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue