aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/references.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/references.rs')
-rw-r--r--crates/ra_ide_api/src/references.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/references.rs b/crates/ra_ide_api/src/references.rs
index 2cb1cc9be..ca145f3e4 100644
--- a/crates/ra_ide_api/src/references.rs
+++ b/crates/ra_ide_api/src/references.rs
@@ -295,17 +295,17 @@ mod tests {
295 fn test_rename(text: &str, new_name: &str, expected: &str) { 295 fn test_rename(text: &str, new_name: &str, expected: &str) {
296 let (analysis, position) = single_file_with_position(text); 296 let (analysis, position) = single_file_with_position(text);
297 let source_change = analysis.rename(position, new_name).unwrap(); 297 let source_change = analysis.rename(position, new_name).unwrap();
298 let mut text_edit_bulder = ra_text_edit::TextEditBuilder::default(); 298 let mut text_edit_builder = ra_text_edit::TextEditBuilder::default();
299 let mut file_id: Option<FileId> = None; 299 let mut file_id: Option<FileId> = None;
300 if let Some(change) = source_change { 300 if let Some(change) = source_change {
301 for edit in change.source_file_edits { 301 for edit in change.source_file_edits {
302 file_id = Some(edit.file_id); 302 file_id = Some(edit.file_id);
303 for atom in edit.edit.as_atoms() { 303 for atom in edit.edit.as_atoms() {
304 text_edit_bulder.replace(atom.delete, atom.insert.clone()); 304 text_edit_builder.replace(atom.delete, atom.insert.clone());
305 } 305 }
306 } 306 }
307 } 307 }
308 let result = text_edit_bulder.finish().apply(&*analysis.file_text(file_id.unwrap())); 308 let result = text_edit_builder.finish().apply(&*analysis.file_text(file_id.unwrap()));
309 assert_eq_text!(expected, &*result); 309 assert_eq_text!(expected, &*result);
310 } 310 }
311} 311}