diff options
author | Jonas Schievink <[email protected]> | 2021-02-04 19:49:24 +0000 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-02-04 19:49:24 +0000 |
commit | 5d99ba1d9a5acf02a5cd50e456f164bd80b523b5 (patch) | |
tree | 073b41689b789308030b4df4344c3aa147cba195 /crates/completion/src/item.rs | |
parent | 36191543a679d4e01c206d2e98a2d7ae170a25e2 (diff) |
Make `ModPath`'s representation private
Diffstat (limited to 'crates/completion/src/item.rs')
-rw-r--r-- | crates/completion/src/item.rs | 4 |
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); |