aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/completion/completion_item.rs4
-rw-r--r--crates/ra_ide/src/references/rename.rs4
-rw-r--r--crates/ra_ide/src/test_utils.rs4
3 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_ide/src/completion/completion_item.rs b/crates/ra_ide/src/completion/completion_item.rs
index 6021f7279..cfb7c1e38 100644
--- a/crates/ra_ide/src/completion/completion_item.rs
+++ b/crates/ra_ide/src/completion/completion_item.rs
@@ -63,8 +63,8 @@ impl fmt::Debug for CompletionItem {
63 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 63 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
64 let mut s = f.debug_struct("CompletionItem"); 64 let mut s = f.debug_struct("CompletionItem");
65 s.field("label", &self.label()).field("source_range", &self.source_range()); 65 s.field("label", &self.label()).field("source_range", &self.source_range());
66 if self.text_edit().as_indels().len() == 1 { 66 if self.text_edit().len() == 1 {
67 let atom = &self.text_edit().as_indels()[0]; 67 let atom = &self.text_edit().iter().next().unwrap();
68 s.field("delete", &atom.delete); 68 s.field("delete", &atom.delete);
69 s.field("insert", &atom.insert); 69 s.field("insert", &atom.insert);
70 } else { 70 } else {
diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs
index 55c3319cb..fd2163dad 100644
--- a/crates/ra_ide/src/references/rename.rs
+++ b/crates/ra_ide/src/references/rename.rs
@@ -983,8 +983,8 @@ mod tests {
983 if let Some(change) = source_change { 983 if let Some(change) = source_change {
984 for edit in change.info.source_file_edits { 984 for edit in change.info.source_file_edits {
985 file_id = Some(edit.file_id); 985 file_id = Some(edit.file_id);
986 for indel in edit.edit.as_indels() { 986 for indel in edit.edit.into_iter() {
987 text_edit_builder.replace(indel.delete, indel.insert.clone()); 987 text_edit_builder.replace(indel.delete, indel.insert);
988 } 988 }
989 } 989 }
990 } 990 }
diff --git a/crates/ra_ide/src/test_utils.rs b/crates/ra_ide/src/test_utils.rs
index 48c8fd1f4..b335582a3 100644
--- a/crates/ra_ide/src/test_utils.rs
+++ b/crates/ra_ide/src/test_utils.rs
@@ -3,9 +3,9 @@
3use ra_syntax::{SourceFile, TextSize}; 3use ra_syntax::{SourceFile, TextSize};
4use ra_text_edit::TextEdit; 4use ra_text_edit::TextEdit;
5 5
6pub use test_utils::*; 6pub(crate) use test_utils::*;
7 7
8pub fn check_action<F: Fn(&SourceFile, TextSize) -> Option<TextEdit>>( 8pub(crate) fn check_action<F: Fn(&SourceFile, TextSize) -> Option<TextEdit>>(
9 before: &str, 9 before: &str,
10 after: &str, 10 after: &str,
11 f: F, 11 f: F,