diff options
-rw-r--r-- | crates/ra_ide/src/completion/completion_item.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/ra_ide/src/completion/completion_item.rs b/crates/ra_ide/src/completion/completion_item.rs index e17586aa5..ea1e0433c 100644 --- a/crates/ra_ide/src/completion/completion_item.rs +++ b/crates/ra_ide/src/completion/completion_item.rs | |||
@@ -52,7 +52,7 @@ pub struct CompletionItem { | |||
52 | /// after completion. | 52 | /// after completion. |
53 | trigger_call_info: bool, | 53 | trigger_call_info: bool, |
54 | 54 | ||
55 | /// Score is usefull to pre select or display in better order completion items | 55 | /// Score is useful to pre select or display in better order completion items |
56 | score: Option<CompletionScore>, | 56 | score: Option<CompletionScore>, |
57 | } | 57 | } |
58 | 58 | ||
@@ -93,6 +93,14 @@ impl fmt::Debug for CompletionItem { | |||
93 | } | 93 | } |
94 | } | 94 | } |
95 | 95 | ||
96 | #[derive(Debug, Clone)] | ||
97 | pub enum CompletionScore { | ||
98 | /// If only type match | ||
99 | TypeMatch, | ||
100 | /// If type and name match | ||
101 | TypeAndNameMatch, | ||
102 | } | ||
103 | |||
96 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] | 104 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] |
97 | pub enum CompletionItemKind { | 105 | pub enum CompletionItemKind { |
98 | Snippet, | 106 | Snippet, |
@@ -319,14 +327,6 @@ impl<'a> Into<CompletionItem> for Builder { | |||
319 | } | 327 | } |
320 | } | 328 | } |
321 | 329 | ||
322 | #[derive(Debug, Clone)] | ||
323 | pub enum CompletionScore { | ||
324 | /// If only type match | ||
325 | TypeMatch, | ||
326 | /// If type and name match | ||
327 | TypeAndNameMatch, | ||
328 | } | ||
329 | |||
330 | /// Represents an in-progress set of completions being built. | 330 | /// Represents an in-progress set of completions being built. |
331 | #[derive(Debug, Default)] | 331 | #[derive(Debug, Default)] |
332 | pub(crate) struct Completions { | 332 | pub(crate) struct Completions { |