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.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/crates/completion/src/item.rs b/crates/completion/src/item.rs
index ce6a44e57..0e59f73cb 100644
--- a/crates/completion/src/item.rs
+++ b/crates/completion/src/item.rs
@@ -257,14 +257,18 @@ impl CompletionItem {
257 pub fn ref_match(&self) -> Option<(Mutability, CompletionScore)> { 257 pub fn ref_match(&self) -> Option<(Mutability, CompletionScore)> {
258 self.ref_match 258 self.ref_match
259 } 259 }
260
261 pub fn import_to_add(&self) -> Option<&ImportToAdd> {
262 self.import_to_add.as_ref()
263 }
260} 264}
261 265
262/// An extra import to add after the completion is applied. 266/// An extra import to add after the completion is applied.
263#[derive(Clone)] 267#[derive(Debug, Clone)]
264pub(crate) struct ImportToAdd { 268pub struct ImportToAdd {
265 pub(crate) import_path: ModPath, 269 pub import_path: ModPath,
266 pub(crate) import_scope: ImportScope, 270 pub import_scope: ImportScope,
267 pub(crate) merge_behaviour: Option<MergeBehaviour>, 271 pub merge_behaviour: Option<MergeBehaviour>,
268} 272}
269 273
270/// A helper to make `CompletionItem`s. 274/// A helper to make `CompletionItem`s.