aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/references
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-24 22:40:41 +0100
committerAleksey Kladov <[email protected]>2020-04-25 10:59:18 +0100
commitb1d5817dd18b7b5fc102a63b084b1ee7ff4f9996 (patch)
treee5d136c5ba4a6ba96aeeb423e6e3f64ca7cea3f9 /crates/ra_ide/src/references
parent27a7718880d93f55f905da606d108d3b3c682ab4 (diff)
Convert code to text-size
Diffstat (limited to 'crates/ra_ide/src/references')
-rw-r--r--crates/ra_ide/src/references/rename.rs4
1 files changed, 2 insertions, 2 deletions
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
54 ReferenceKind::StructFieldShorthandForField => { 54 ReferenceKind::StructFieldShorthandForField => {
55 replacement_text.push_str(new_name); 55 replacement_text.push_str(new_name);
56 replacement_text.push_str(": "); 56 replacement_text.push_str(": ");
57 TextRange::from_to( 57 TextRange::new(
58 reference.file_range.range.start(), 58 reference.file_range.range.start(),
59 reference.file_range.range.start(), 59 reference.file_range.range.start(),
60 ) 60 )
@@ -62,7 +62,7 @@ fn source_edit_from_reference(reference: Reference, new_name: &str) -> SourceFil
62 ReferenceKind::StructFieldShorthandForLocal => { 62 ReferenceKind::StructFieldShorthandForLocal => {
63 replacement_text.push_str(": "); 63 replacement_text.push_str(": ");
64 replacement_text.push_str(new_name); 64 replacement_text.push_str(new_name);
65 TextRange::from_to(reference.file_range.range.end(), reference.file_range.range.end()) 65 TextRange::new(reference.file_range.range.end(), reference.file_range.range.end())
66 } 66 }
67 _ => { 67 _ => {
68 replacement_text.push_str(new_name); 68 replacement_text.push_str(new_name);