Make assist lazy again

This commit is contained in:
Ali Bektas 2023-09-11 13:33:26 +02:00
parent 38491fcf07
commit 893e19137e

View File

@ -218,12 +218,12 @@ pub(crate) fn inline_call(acc: &mut Assists, ctx: &AssistContext<'_>) -> Option<
}
let syntax = call_info.node.syntax().clone();
let replacement = inline(&ctx.sema, file_id, function, &fn_body, &params, &call_info);
acc.add(
AssistId("inline_call", AssistKind::RefactorInline),
label,
syntax.text_range(),
|builder| {
let replacement = inline(&ctx.sema, file_id, function, &fn_body, &params, &call_info);
builder.replace_ast(
match call_info.node {
ast::CallableExpr::Call(it) => ast::Expr::CallExpr(it),