From abc0ed36bdf4975dc9c5fb2ddd3f960ad2db5494 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 9 Mar 2021 17:44:27 +0300 Subject: [PATCH] Cleanup --- crates/ide_completion/src/item.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/ide_completion/src/item.rs b/crates/ide_completion/src/item.rs index b6bc11da290..b16f0775aa1 100644 --- a/crates/ide_completion/src/item.rs +++ b/crates/ide_completion/src/item.rs @@ -208,7 +208,7 @@ pub(crate) fn new( lookup: None, kind: None, text_edit: None, - deprecated: None, + deprecated: false, trigger_call_info: None, score: None, ref_match: None, @@ -308,7 +308,7 @@ pub(crate) struct Builder { lookup: Option, kind: Option, text_edit: Option, - deprecated: Option, + deprecated: bool, trigger_call_info: Option, score: Option, ref_match: Option<(Mutability, CompletionScore)>, @@ -355,7 +355,7 @@ pub(crate) fn build(self) -> CompletionItem { lookup, kind: self.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), score: self.score, ref_match: self.ref_match, @@ -415,7 +415,7 @@ pub(crate) fn set_documentation(mut self, docs: Option) -> Builde self } pub(crate) fn set_deprecated(mut self, deprecated: bool) -> Builder { - self.deprecated = Some(deprecated); + self.deprecated = deprecated; self } pub(crate) fn set_score(mut self, score: CompletionScore) -> Builder {