Unnamed repository; edit this file 'description' to name the repository.
| -rw-r--r-- | crates/ide-assists/src/handlers/inline_call.rs | 2 | ||||
| -rw-r--r-- | crates/syntax/src/ast/edit_in_place.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide-assists/src/handlers/inline_call.rs b/crates/ide-assists/src/handlers/inline_call.rs index d95456fd3f..5299680980 100644 --- a/crates/ide-assists/src/handlers/inline_call.rs +++ b/crates/ide-assists/src/handlers/inline_call.rs @@ -560,7 +560,7 @@ fn inline( let inline_direct = |editor: &SyntaxEditor, usage: &PathExpr, replacement: &ast::Expr| { if let Some(field) = path_expr_as_record_field(usage) { cov_mark::hit!(inline_call_inline_direct_field); - field.replace_expr_with_editor(editor, replacement.clone()); + field.replace_expr(editor, replacement.clone()); } else { editor.replace(usage.syntax(), replacement.syntax()); } diff --git a/crates/syntax/src/ast/edit_in_place.rs b/crates/syntax/src/ast/edit_in_place.rs index defa2f10f7..fe215c466f 100644 --- a/crates/syntax/src/ast/edit_in_place.rs +++ b/crates/syntax/src/ast/edit_in_place.rs @@ -359,7 +359,7 @@ impl ast::RecordExprFieldList { impl ast::RecordExprField { /// This will either replace the initializer, or in the case that this is a shorthand convert /// the initializer into the name ref and insert the expr as the new initializer. - pub fn replace_expr_with_editor(&self, editor: &SyntaxEditor, expr: ast::Expr) { + pub fn replace_expr(&self, editor: &SyntaxEditor, expr: ast::Expr) { if self.name_ref().is_some() { if let Some(prev) = self.expr() { editor.replace(prev.syntax(), expr.syntax()); |