Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/item.rs')
-rw-r--r--crates/ide-completion/src/item.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/crates/ide-completion/src/item.rs b/crates/ide-completion/src/item.rs
index b982322a73..de41a5bd70 100644
--- a/crates/ide-completion/src/item.rs
+++ b/crates/ide-completion/src/item.rs
@@ -458,13 +458,11 @@ impl Builder {
}
if let [import_edit] = &*self.imports_to_add {
// snippets can have multiple imports, but normal completions only have up to one
- if let Some(original_path) = import_edit.original_path.as_ref() {
- label_detail.replace(SmolStr::from(format!(
- "{} (use {})",
- label_detail.as_deref().unwrap_or_default(),
- original_path.display(db)
- )));
- }
+ label_detail.replace(SmolStr::from(format!(
+ "{} (use {})",
+ label_detail.as_deref().unwrap_or_default(),
+ import_edit.import_path.display(db)
+ )));
} else if let Some(trait_name) = self.trait_name {
label_detail.replace(SmolStr::from(format!(
"{} (as {trait_name})",