diff options
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()); |