remove edit_in_place from replace_let_with_if_let assist with edit::AstNodeEdit
This commit is contained in:
parent
b214aac14c
commit
3a202c4736
1 changed files with 2 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use ide_db::ty_filter::TryEnum;
|
||||
use syntax::{
|
||||
AstNode, T,
|
||||
ast::{self, edit::IndentLevel, edit_in_place::Indent, syntax_factory::SyntaxFactory},
|
||||
ast::{self, edit::{AstNodeEdit, IndentLevel}, syntax_factory::SyntaxFactory},
|
||||
};
|
||||
|
||||
use crate::{AssistContext, AssistId, Assists};
|
||||
|
|
@ -64,7 +64,7 @@ pub(crate) fn replace_let_with_if_let(acc: &mut Assists, ctx: &AssistContext<'_>
|
|||
if let_expr_needs_paren(&init) { make.expr_paren(init).into() } else { init };
|
||||
|
||||
let block = make.block_expr([], None);
|
||||
block.indent(IndentLevel::from_node(let_stmt.syntax()));
|
||||
let block = block.indent(IndentLevel::from_node(let_stmt.syntax()));
|
||||
let if_expr = make.expr_if(
|
||||
make.expr_let(pat, init_expr).into(),
|
||||
block,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue