aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/assists/add_missing_impl_members.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/assists/add_missing_impl_members.rs')
-rw-r--r--crates/ra_assists/src/assists/add_missing_impl_members.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ra_assists/src/assists/add_missing_impl_members.rs b/crates/ra_assists/src/assists/add_missing_impl_members.rs
index 2894bdd8a..22d20909d 100644
--- a/crates/ra_assists/src/assists/add_missing_impl_members.rs
+++ b/crates/ra_assists/src/assists/add_missing_impl_members.rs
@@ -4,7 +4,7 @@ use ra_syntax::{
4 SmolStr, 4 SmolStr,
5}; 5};
6 6
7use crate::{ast_builder::AstBuilder, ast_editor::AstEditor, Assist, AssistCtx, AssistId}; 7use crate::{ast_builder::Make, ast_editor::AstEditor, Assist, AssistCtx, AssistId};
8 8
9#[derive(PartialEq)] 9#[derive(PartialEq)]
10enum AddMissingImplMembersMode { 10enum AddMissingImplMembersMode {
@@ -102,9 +102,7 @@ fn strip_docstring(item: ast::ImplItem) -> ast::ImplItem {
102fn add_body(fn_def: ast::FnDef) -> ast::FnDef { 102fn add_body(fn_def: ast::FnDef) -> ast::FnDef {
103 let mut ast_editor = AstEditor::new(fn_def.clone()); 103 let mut ast_editor = AstEditor::new(fn_def.clone());
104 if fn_def.body().is_none() { 104 if fn_def.body().is_none() {
105 ast_editor.set_body(&AstBuilder::<ast::Block>::single_expr( 105 ast_editor.set_body(&Make::<ast::Block>::single_expr(Make::<ast::Expr>::unimplemented()));
106 &AstBuilder::<ast::Expr>::unimplemented(),
107 ));
108 } 106 }
109 ast_editor.ast().to_owned() 107 ast_editor.ast().to_owned()
110} 108}