From ebb584ce669d04f109d5b21a08aca9d4e9acecc8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 22 Dec 2018 01:14:15 +0300 Subject: rename completion kind --- crates/ra_analysis/src/completion/completion_item.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates') 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 { lookup: Option, snippet: Option, /// Used only internally in test, to check only specific kind of completion. - kind: CompletionKind, + completion_kind: CompletionKind, } pub enum InsertText { @@ -34,7 +34,7 @@ impl CompletionItem { label, lookup: None, snippet: None, - kind: CompletionKind::Unspecified, + completion_kind: CompletionKind::Unspecified, } } /// What user sees in pop-up in the UI. @@ -65,7 +65,7 @@ pub(crate) struct Builder { label: String, lookup: Option, snippet: Option, - kind: CompletionKind, + completion_kind: CompletionKind, } impl Builder { @@ -78,7 +78,7 @@ impl Builder { label: self.label, lookup: self.lookup, snippet: self.snippet, - kind: self.kind, + completion_kind: self.completion_kind, } } pub(crate) fn lookup_by(mut self, lookup: impl Into) -> Builder { @@ -90,7 +90,7 @@ impl Builder { self } pub(crate) fn kind(mut self, kind: CompletionKind) -> Builder { - self.kind = kind; + self.completion_kind = kind; self } } @@ -154,7 +154,7 @@ impl Completions { fn debug_render(&self, kind: CompletionKind) -> String { let mut res = String::new(); for c in self.buf.iter() { - if c.kind == kind { + if c.completion_kind == kind { if let Some(lookup) = &c.lookup { res.push_str(lookup); res.push_str(&format!(" {:?}", c.label)); -- cgit v1.2.3