aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-23 23:11:33 +0100
committerAleksey Kladov <[email protected]>2020-04-23 23:11:33 +0100
commit75cb1c1806b2fd21b7b3f9ca7ed0ef9111bc1a35 (patch)
tree20995059c113e6feb68b0b293601a2bd6d4d7cf7 /crates/ra_ide
parent5eb51c1e6049c61be60a28894b80a7753f06cfeb (diff)
Move
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/completion/completion_item.rs18
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)]
97pub 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)]
97pub enum CompletionItemKind { 105pub 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)]
323pub 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)]
332pub(crate) struct Completions { 332pub(crate) struct Completions {