diff options
author | Aleksey Kladov <[email protected]> | 2020-03-06 14:38:48 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-03-06 14:38:48 +0000 |
commit | 85e2346b749c97181b9bac51490bbbc4bb648971 (patch) | |
tree | b873da91e07d806641e8aac86d235ce0790d0bc6 /crates/ra_syntax/src/ast/edit.rs | |
parent | 5947c1f8b52deb4fcfd97970ba6eb473f092cb94 (diff) |
Simplify creation of `T[,]`
Diffstat (limited to 'crates/ra_syntax/src/ast/edit.rs')
-rw-r--r-- | crates/ra_syntax/src/ast/edit.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs index e4cdccdb4..40a04b9c5 100644 --- a/crates/ra_syntax/src/ast/edit.rs +++ b/crates/ra_syntax/src/ast/edit.rs | |||
@@ -139,7 +139,7 @@ impl ast::RecordFieldList { | |||
139 | let mut to_insert: ArrayVec<[SyntaxElement; 4]> = ArrayVec::new(); | 139 | let mut to_insert: ArrayVec<[SyntaxElement; 4]> = ArrayVec::new(); |
140 | to_insert.push(space.into()); | 140 | to_insert.push(space.into()); |
141 | to_insert.push(field.syntax().clone().into()); | 141 | to_insert.push(field.syntax().clone().into()); |
142 | to_insert.push(tokens::comma().into()); | 142 | to_insert.push(make::token(T![,]).into()); |
143 | 143 | ||
144 | macro_rules! after_l_curly { | 144 | macro_rules! after_l_curly { |
145 | () => {{ | 145 | () => {{ |
@@ -160,7 +160,7 @@ impl ast::RecordFieldList { | |||
160 | { | 160 | { |
161 | InsertPosition::After(comma) | 161 | InsertPosition::After(comma) |
162 | } else { | 162 | } else { |
163 | to_insert.insert(0, tokens::comma().into()); | 163 | to_insert.insert(0, make::token(T![,]).into()); |
164 | InsertPosition::After($anchor.syntax().clone().into()) | 164 | InsertPosition::After($anchor.syntax().clone().into()) |
165 | } | 165 | } |
166 | }; | 166 | }; |