diff options
Diffstat (limited to 'crates/ra_ide')
-rw-r--r-- | crates/ra_ide/src/references/rename.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs index bcb62b33d..bdb90020b 100644 --- a/crates/ra_ide/src/references/rename.rs +++ b/crates/ra_ide/src/references/rename.rs | |||
@@ -99,17 +99,13 @@ fn rename_mod( | |||
99 | source_file_edits.push(edit); | 99 | source_file_edits.push(edit); |
100 | 100 | ||
101 | if let Some(RangeInfo { range: _, info: refs }) = find_all_refs(db, position, None) { | 101 | if let Some(RangeInfo { range: _, info: refs }) = find_all_refs(db, position, None) { |
102 | let ref_edits = refs | 102 | let ref_edits = refs.references.into_iter().map(|reference| { |
103 | .references | 103 | source_edit_from_file_id_range( |
104 | .into_iter() | 104 | reference.file_range.file_id, |
105 | .map(|reference| { | 105 | reference.file_range.range, |
106 | source_edit_from_file_id_range( | 106 | new_name, |
107 | reference.file_range.file_id, | 107 | ) |
108 | reference.file_range.range, | 108 | }); |
109 | new_name, | ||
110 | ) | ||
111 | }) | ||
112 | .collect::<Vec<_>>(); | ||
113 | source_file_edits.extend(ref_edits); | 109 | source_file_edits.extend(ref_edits); |
114 | } | 110 | } |
115 | 111 | ||