This commit is contained in:
Aleksey Kladov 2021-03-09 17:44:27 +03:00
parent 444d67ae18
commit abc0ed36bd

View File

@ -208,7 +208,7 @@ pub(crate) fn new(
lookup: None, lookup: None,
kind: None, kind: None,
text_edit: None, text_edit: None,
deprecated: None, deprecated: false,
trigger_call_info: None, trigger_call_info: None,
score: None, score: None,
ref_match: None, ref_match: None,
@ -308,7 +308,7 @@ pub(crate) struct Builder {
lookup: Option<String>, lookup: Option<String>,
kind: Option<CompletionItemKind>, kind: Option<CompletionItemKind>,
text_edit: Option<TextEdit>, text_edit: Option<TextEdit>,
deprecated: Option<bool>, deprecated: bool,
trigger_call_info: Option<bool>, trigger_call_info: Option<bool>,
score: Option<CompletionScore>, score: Option<CompletionScore>,
ref_match: Option<(Mutability, CompletionScore)>, ref_match: Option<(Mutability, CompletionScore)>,
@ -355,7 +355,7 @@ pub(crate) fn build(self) -> CompletionItem {
lookup, lookup,
kind: self.kind, kind: self.kind,
completion_kind: self.completion_kind, completion_kind: self.completion_kind,
deprecated: self.deprecated.unwrap_or(false), deprecated: self.deprecated,
trigger_call_info: self.trigger_call_info.unwrap_or(false), trigger_call_info: self.trigger_call_info.unwrap_or(false),
score: self.score, score: self.score,
ref_match: self.ref_match, ref_match: self.ref_match,
@ -415,7 +415,7 @@ pub(crate) fn set_documentation(mut self, docs: Option<Documentation>) -> Builde
self self
} }
pub(crate) fn set_deprecated(mut self, deprecated: bool) -> Builder { pub(crate) fn set_deprecated(mut self, deprecated: bool) -> Builder {
self.deprecated = Some(deprecated); self.deprecated = deprecated;
self self
} }
pub(crate) fn set_score(mut self, score: CompletionScore) -> Builder { pub(crate) fn set_score(mut self, score: CompletionScore) -> Builder {