Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-db/src/rename.rs')
| -rw-r--r-- | crates/ide-db/src/rename.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide-db/src/rename.rs b/crates/ide-db/src/rename.rs index 775b85c479..16224ae5ee 100644 --- a/crates/ide-db/src/rename.rs +++ b/crates/ide-db/src/rename.rs @@ -459,7 +459,7 @@ fn rename_field_constructors( }; expr.record_expr_field_list()?.fields().find_map(|record_field| { if record_field.name_ref().is_none() - && Name::new_root(&record_field.field_name()?.text()) == old_name + && Name::new_root(record_field.field_name()?.text()) == old_name && let ast::Expr::PathExpr(field_name) = record_field.expr()? { field_name.path() @@ -747,7 +747,7 @@ fn source_edit_from_def<'db>( .text_range() .cover_offset(pat.syntax().text_range().start()), ); - edit.replace(name_range, name_ref.text().to_string()); + edit.replace(name_range, name_ref.text().to_owned()); } else { // Foo { field: ref mut local @ local 2} -> Foo { field: ref mut new_name @ local2 } // Foo { field: ref mut local } -> Foo { field: ref mut new_name } |