mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Simplify
This commit is contained in:
parent
40cbeb5b3d
commit
9d3e616f82
6 changed files with 33 additions and 29 deletions
|
@ -645,7 +645,7 @@ impl ast::RecordPatFieldList {
|
|||
}
|
||||
|
||||
fn get_or_insert_comma_after(syntax: &SyntaxNode) -> SyntaxToken {
|
||||
let comma = match syntax
|
||||
match syntax
|
||||
.siblings_with_tokens(Direction::Next)
|
||||
.filter_map(|it| it.into_token())
|
||||
.find(|it| it.kind() == T![,])
|
||||
|
@ -656,8 +656,7 @@ fn get_or_insert_comma_after(syntax: &SyntaxNode) -> SyntaxToken {
|
|||
ted::insert(Position::after(syntax), &comma);
|
||||
comma
|
||||
}
|
||||
};
|
||||
comma
|
||||
}
|
||||
}
|
||||
|
||||
impl ast::StmtList {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue