mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-28 21:05:13 +00:00
Make assist lazy again
This commit is contained in:
parent
38491fcf07
commit
893e19137e
1 changed files with 1 additions and 1 deletions
|
@ -218,12 +218,12 @@ pub(crate) fn inline_call(acc: &mut Assists, ctx: &AssistContext<'_>) -> Option<
|
||||||
}
|
}
|
||||||
|
|
||||||
let syntax = call_info.node.syntax().clone();
|
let syntax = call_info.node.syntax().clone();
|
||||||
let replacement = inline(&ctx.sema, file_id, function, &fn_body, ¶ms, &call_info);
|
|
||||||
acc.add(
|
acc.add(
|
||||||
AssistId("inline_call", AssistKind::RefactorInline),
|
AssistId("inline_call", AssistKind::RefactorInline),
|
||||||
label,
|
label,
|
||||||
syntax.text_range(),
|
syntax.text_range(),
|
||||||
|builder| {
|
|builder| {
|
||||||
|
let replacement = inline(&ctx.sema, file_id, function, &fn_body, ¶ms, &call_info);
|
||||||
builder.replace_ast(
|
builder.replace_ast(
|
||||||
match call_info.node {
|
match call_info.node {
|
||||||
ast::CallableExpr::Call(it) => ast::Expr::CallExpr(it),
|
ast::CallableExpr::Call(it) => ast::Expr::CallExpr(it),
|
||||||
|
|
Loading…
Reference in a new issue