From 5f57491c981530103e1e26dcd280e1a2df10f853 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 21 May 2020 15:56:18 +0200 Subject: Cleanup TextEdit --- crates/ra_ide/src/completion/completion_item.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/src/completion') 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 { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let mut s = f.debug_struct("CompletionItem"); s.field("label", &self.label()).field("source_range", &self.source_range()); - if self.text_edit().as_indels().len() == 1 { - let atom = &self.text_edit().as_indels()[0]; + if self.text_edit().len() == 1 { + let atom = &self.text_edit().iter().next().unwrap(); s.field("delete", &atom.delete); s.field("insert", &atom.insert); } else { -- cgit v1.2.3