aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-12-21 22:14:15 +0000
committerAleksey Kladov <[email protected]>2018-12-21 22:42:26 +0000
commitebb584ce669d04f109d5b21a08aca9d4e9acecc8 (patch)
tree88fbe843831d974bb271986bb8ed16ae0846ef02 /crates
parent184665ff9b7b64730ecf481c1914a74e7191a6dd (diff)
rename completion kind
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_analysis/src/completion/completion_item.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_analysis/src/completion/completion_item.rs b/crates/ra_analysis/src/completion/completion_item.rs
index d5d751759..30581c8a5 100644
--- a/crates/ra_analysis/src/completion/completion_item.rs
+++ b/crates/ra_analysis/src/completion/completion_item.rs
@@ -7,7 +7,7 @@ pub struct CompletionItem {
7 lookup: Option<String>, 7 lookup: Option<String>,
8 snippet: Option<String>, 8 snippet: Option<String>,
9 /// Used only internally in test, to check only specific kind of completion. 9 /// Used only internally in test, to check only specific kind of completion.
10 kind: CompletionKind, 10 completion_kind: CompletionKind,
11} 11}
12 12
13pub enum InsertText { 13pub enum InsertText {
@@ -34,7 +34,7 @@ impl CompletionItem {
34 label, 34 label,
35 lookup: None, 35 lookup: None,
36 snippet: None, 36 snippet: None,
37 kind: CompletionKind::Unspecified, 37 completion_kind: CompletionKind::Unspecified,
38 } 38 }
39 } 39 }
40 /// What user sees in pop-up in the UI. 40 /// What user sees in pop-up in the UI.
@@ -65,7 +65,7 @@ pub(crate) struct Builder {
65 label: String, 65 label: String,
66 lookup: Option<String>, 66 lookup: Option<String>,
67 snippet: Option<String>, 67 snippet: Option<String>,
68 kind: CompletionKind, 68 completion_kind: CompletionKind,
69} 69}
70 70
71impl Builder { 71impl Builder {
@@ -78,7 +78,7 @@ impl Builder {
78 label: self.label, 78 label: self.label,
79 lookup: self.lookup, 79 lookup: self.lookup,
80 snippet: self.snippet, 80 snippet: self.snippet,
81 kind: self.kind, 81 completion_kind: self.completion_kind,
82 } 82 }
83 } 83 }
84 pub(crate) fn lookup_by(mut self, lookup: impl Into<String>) -> Builder { 84 pub(crate) fn lookup_by(mut self, lookup: impl Into<String>) -> Builder {
@@ -90,7 +90,7 @@ impl Builder {
90 self 90 self
91 } 91 }
92 pub(crate) fn kind(mut self, kind: CompletionKind) -> Builder { 92 pub(crate) fn kind(mut self, kind: CompletionKind) -> Builder {
93 self.kind = kind; 93 self.completion_kind = kind;
94 self 94 self
95 } 95 }
96} 96}
@@ -154,7 +154,7 @@ impl Completions {
154 fn debug_render(&self, kind: CompletionKind) -> String { 154 fn debug_render(&self, kind: CompletionKind) -> String {
155 let mut res = String::new(); 155 let mut res = String::new();
156 for c in self.buf.iter() { 156 for c in self.buf.iter() {
157 if c.kind == kind { 157 if c.completion_kind == kind {
158 if let Some(lookup) = &c.lookup { 158 if let Some(lookup) = &c.lookup {
159 res.push_str(lookup); 159 res.push_str(lookup);
160 res.push_str(&format!(" {:?}", c.label)); 160 res.push_str(&format!(" {:?}", c.label));