From b1d5817dd18b7b5fc102a63b084b1ee7ff4f9996 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 24 Apr 2020 23:40:41 +0200 Subject: Convert code to text-size --- crates/ra_ide/src/references/rename.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/src/references') diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs index 9acc6158a..1c64b3eb9 100644 --- a/crates/ra_ide/src/references/rename.rs +++ b/crates/ra_ide/src/references/rename.rs @@ -54,7 +54,7 @@ fn source_edit_from_reference(reference: Reference, new_name: &str) -> SourceFil ReferenceKind::StructFieldShorthandForField => { replacement_text.push_str(new_name); replacement_text.push_str(": "); - TextRange::from_to( + TextRange::new( reference.file_range.range.start(), reference.file_range.range.start(), ) @@ -62,7 +62,7 @@ fn source_edit_from_reference(reference: Reference, new_name: &str) -> SourceFil ReferenceKind::StructFieldShorthandForLocal => { replacement_text.push_str(": "); replacement_text.push_str(new_name); - TextRange::from_to(reference.file_range.range.end(), reference.file_range.range.end()) + TextRange::new(reference.file_range.range.end(), reference.file_range.range.end()) } _ => { replacement_text.push_str(new_name); -- cgit v1.2.3