remove edit_in_place from move_const_to_impl assist with edit::AstNodeEdit
This commit is contained in:
parent
3a202c4736
commit
28bf2dbb13
1 changed files with 3 additions and 2 deletions
|
|
@ -2,7 +2,7 @@ use hir::{AsAssocItem, AssocItemContainer, FileRange, HasSource};
|
|||
use ide_db::{assists::AssistId, defs::Definition, search::SearchScope};
|
||||
use syntax::{
|
||||
SyntaxKind,
|
||||
ast::{self, AstNode, edit::IndentLevel, edit_in_place::Indent},
|
||||
ast::{self, AstNode, edit::{AstNodeEdit, IndentLevel}},
|
||||
};
|
||||
|
||||
use crate::assist_context::{AssistContext, Assists};
|
||||
|
|
@ -136,7 +136,8 @@ pub(crate) fn move_const_to_impl(acc: &mut Assists, ctx: &AssistContext<'_>) ->
|
|||
let indent = IndentLevel::from_node(parent_fn.syntax());
|
||||
|
||||
let const_ = const_.clone_for_update();
|
||||
const_.reindent_to(indent);
|
||||
let const_ = const_.reset_indent();
|
||||
let const_ = const_.indent(indent);
|
||||
builder.insert(insert_offset, format!("\n{indent}{const_}{fixup}"));
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue