mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 21:28:51 +00:00
Merge #3957
3957: Remove more unnecessary braces r=kjeremy a=lnicola See #3866. Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
This commit is contained in:
commit
c388130f5f
1 changed files with 2 additions and 2 deletions
|
@ -69,8 +69,8 @@ fn get_fields_kind(node: &SyntaxNode) -> Vec<SyntaxKind> {
|
||||||
fn get_field_name(node: &SyntaxNode) -> String {
|
fn get_field_name(node: &SyntaxNode) -> String {
|
||||||
let res = match_ast! {
|
let res = match_ast! {
|
||||||
match node {
|
match node {
|
||||||
ast::RecordField(field) => { field.field_name().map(|it| it.to_string()) },
|
ast::RecordField(field) => field.field_name().map(|it| it.to_string()),
|
||||||
ast::RecordFieldPat(field) => { field.field_name().map(|it| it.to_string()) },
|
ast::RecordFieldPat(field) => field.field_name().map(|it| it.to_string()),
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue