aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/item.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/completion/src/item.rs')
-rw-r--r--crates/completion/src/item.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/completion/src/item.rs b/crates/completion/src/item.rs
index 8ec4ac65e..884711f11 100644
--- a/crates/completion/src/item.rs
+++ b/crates/completion/src/item.rs
@@ -332,9 +332,9 @@ impl Builder {
332 label = format!("{} ({})", label, import_to_add.import_path); 332 label = format!("{} ({})", label, import_to_add.import_path);
333 } else { 333 } else {
334 let mut import_path_without_last_segment = import_to_add.import_path.to_owned(); 334 let mut import_path_without_last_segment = import_to_add.import_path.to_owned();
335 let _ = import_path_without_last_segment.segments.pop(); 335 let _ = import_path_without_last_segment.pop_segment();
336 336
337 if !import_path_without_last_segment.segments.is_empty() { 337 if !import_path_without_last_segment.segments().is_empty() {
338 lookup = lookup.or_else(|| Some(label.clone())); 338 lookup = lookup.or_else(|| Some(label.clone()));
339 insert_text = insert_text.or_else(|| Some(label.clone())); 339 insert_text = insert_text.or_else(|| Some(label.clone()));
340 label = format!("{}::{}", import_path_without_last_segment, label); 340 label = format!("{}::{}", import_path_without_last_segment, label);