From 5d99ba1d9a5acf02a5cd50e456f164bd80b523b5 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Thu, 4 Feb 2021 20:49:24 +0100 Subject: Make `ModPath`'s representation private --- crates/completion/src/item.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/completion/src/item.rs') 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 { label = format!("{} ({})", label, import_to_add.import_path); } else { let mut import_path_without_last_segment = import_to_add.import_path.to_owned(); - let _ = import_path_without_last_segment.segments.pop(); + let _ = import_path_without_last_segment.pop_segment(); - if !import_path_without_last_segment.segments.is_empty() { + if !import_path_without_last_segment.segments().is_empty() { lookup = lookup.or_else(|| Some(label.clone())); insert_text = insert_text.or_else(|| Some(label.clone())); label = format!("{}::{}", import_path_without_last_segment, label); -- cgit v1.2.3