]> git.lizzy.rs Git - rust.git/commitdiff
Move
authorAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 23 Apr 2020 22:11:33 +0000 (00:11 +0200)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 23 Apr 2020 22:11:33 +0000 (00:11 +0200)
crates/ra_ide/src/completion/completion_item.rs

index e17586aa5bf83a8a56ab6a41db2d97a94c35a6a5..ea1e0433c0d257ccf757c27999dc2f3bd0aa6306 100644 (file)
@@ -52,7 +52,7 @@ pub struct CompletionItem {
     /// after completion.
     trigger_call_info: bool,
 
-    /// Score is usefull to pre select or display in better order completion items
+    /// Score is useful to pre select or display in better order completion items
     score: Option<CompletionScore>,
 }
 
@@ -93,6 +93,14 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
     }
 }
 
+#[derive(Debug, Clone)]
+pub enum CompletionScore {
+    /// If only type match
+    TypeMatch,
+    /// If type and name match
+    TypeAndNameMatch,
+}
+
 #[derive(Debug, Clone, Copy, PartialEq, Eq)]
 pub enum CompletionItemKind {
     Snippet,
@@ -319,14 +327,6 @@ fn into(self) -> CompletionItem {
     }
 }
 
-#[derive(Debug, Clone)]
-pub enum CompletionScore {
-    /// If only type match
-    TypeMatch,
-    /// If type and name match
-    TypeAndNameMatch,
-}
-
 /// Represents an in-progress set of completions being built.
 #[derive(Debug, Default)]
 pub(crate) struct Completions {