From 9ee3914c61f0476d28d3f74f046f487900e2a6fb Mon Sep 17 00:00:00 2001 From: Josh Mcguigan Date: Thu, 11 Mar 2021 19:13:27 -0800 Subject: remove unused CompletionScore enum --- crates/ide/src/lib.rs | 4 ++-- crates/ide_completion/src/item.rs | 8 -------- crates/ide_completion/src/lib.rs | 5 +---- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index 16302eb2f..0a493d2f3 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs @@ -87,8 +87,8 @@ pub use crate::{ pub use hir::{Documentation, Semantics}; pub use ide_assists::{Assist, AssistConfig, AssistId, AssistKind}; pub use ide_completion::{ - CompletionConfig, CompletionItem, CompletionItemKind, CompletionRelevance, CompletionScore, - ImportEdit, InsertTextFormat, + CompletionConfig, CompletionItem, CompletionItemKind, CompletionRelevance, ImportEdit, + InsertTextFormat, }; pub use ide_db::{ base_db::{ diff --git a/crates/ide_completion/src/item.rs b/crates/ide_completion/src/item.rs index 9a4dc915c..30317842d 100644 --- a/crates/ide_completion/src/item.rs +++ b/crates/ide_completion/src/item.rs @@ -122,14 +122,6 @@ impl fmt::Debug for CompletionItem { } } -#[derive(Debug, Clone, Copy, Ord, PartialOrd, Eq, PartialEq)] -pub enum CompletionScore { - /// If only type match - TypeMatch, - /// If type and name match - TypeAndNameMatch, -} - #[derive(Debug, Clone, Copy, Ord, PartialOrd, Eq, PartialEq, Default)] pub struct CompletionRelevance { /// This is set in cases like these: diff --git a/crates/ide_completion/src/lib.rs b/crates/ide_completion/src/lib.rs index 21e489755..263554ecf 100644 --- a/crates/ide_completion/src/lib.rs +++ b/crates/ide_completion/src/lib.rs @@ -23,10 +23,7 @@ use crate::{completions::Completions, context::CompletionContext, item::Completi pub use crate::{ config::CompletionConfig, - item::{ - CompletionItem, CompletionItemKind, CompletionRelevance, CompletionScore, ImportEdit, - InsertTextFormat, - }, + item::{CompletionItem, CompletionItemKind, CompletionRelevance, ImportEdit, InsertTextFormat}, }; //FIXME: split the following feature into fine-grained features. -- cgit v1.2.3