diff options
author | Aleksey Kladov <[email protected]> | 2020-04-10 09:11:05 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-04-10 15:10:28 +0100 |
commit | c8b4c36f8161d34c8145a49965efee4514275989 (patch) | |
tree | 3b0a50994d76571cdfb2318f2799e6161962974c /crates/ra_syntax/src/ast/edit.rs | |
parent | f89f2e38855f5b47f68758e98139aa962cb7a01d (diff) |
Semicolon token
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 3d428fab3..a01f6487d 100644 --- a/crates/ra_syntax/src/ast/edit.rs +++ b/crates/ra_syntax/src/ast/edit.rs | |||
@@ -32,9 +32,9 @@ impl ast::FnDef { | |||
32 | let mut to_insert: ArrayVec<[SyntaxElement; 2]> = ArrayVec::new(); | 32 | let mut to_insert: ArrayVec<[SyntaxElement; 2]> = ArrayVec::new(); |
33 | let old_body_or_semi: SyntaxElement = if let Some(old_body) = self.body() { | 33 | let old_body_or_semi: SyntaxElement = if let Some(old_body) = self.body() { |
34 | old_body.syntax().clone().into() | 34 | old_body.syntax().clone().into() |
35 | } else if let Some(semi) = self.semi_token() { | 35 | } else if let Some(semi) = self.semicolon_token() { |
36 | to_insert.push(make::tokens::single_space().into()); | 36 | to_insert.push(make::tokens::single_space().into()); |
37 | semi.syntax.clone().into() | 37 | semi.into() |
38 | } else { | 38 | } else { |
39 | to_insert.push(make::tokens::single_space().into()); | 39 | to_insert.push(make::tokens::single_space().into()); |
40 | to_insert.push(body.syntax().clone().into()); | 40 | to_insert.push(body.syntax().clone().into()); |