diff options
Diffstat (limited to 'crates/ide_completion/src/completions/flyimport.rs')
-rw-r--r-- | crates/ide_completion/src/completions/flyimport.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crates/ide_completion/src/completions/flyimport.rs b/crates/ide_completion/src/completions/flyimport.rs index da8375af9..f34764b61 100644 --- a/crates/ide_completion/src/completions/flyimport.rs +++ b/crates/ide_completion/src/completions/flyimport.rs | |||
@@ -55,7 +55,6 @@ use ide_db::helpers::{ | |||
55 | }; | 55 | }; |
56 | use rustc_hash::FxHashSet; | 56 | use rustc_hash::FxHashSet; |
57 | use syntax::{AstNode, SyntaxNode, T}; | 57 | use syntax::{AstNode, SyntaxNode, T}; |
58 | use test_utils::mark; | ||
59 | 58 | ||
60 | use crate::{ | 59 | use crate::{ |
61 | context::CompletionContext, | 60 | context::CompletionContext, |
@@ -174,7 +173,7 @@ fn import_assets(ctx: &CompletionContext, fuzzy_name: String) -> Option<ImportAs | |||
174 | if matches!(assets_for_path.as_ref()?.import_candidate(), ImportCandidate::Path(_)) | 173 | if matches!(assets_for_path.as_ref()?.import_candidate(), ImportCandidate::Path(_)) |
175 | && fuzzy_name_length < 2 | 174 | && fuzzy_name_length < 2 |
176 | { | 175 | { |
177 | mark::hit!(ignore_short_input_for_path); | 176 | cov_mark::hit!(ignore_short_input_for_path); |
178 | None | 177 | None |
179 | } else { | 178 | } else { |
180 | assets_for_path | 179 | assets_for_path |
@@ -186,7 +185,7 @@ fn compute_fuzzy_completion_order_key( | |||
186 | proposed_mod_path: &ModPath, | 185 | proposed_mod_path: &ModPath, |
187 | user_input_lowercased: &str, | 186 | user_input_lowercased: &str, |
188 | ) -> usize { | 187 | ) -> usize { |
189 | mark::hit!(certain_fuzzy_order_test); | 188 | cov_mark::hit!(certain_fuzzy_order_test); |
190 | let proposed_import_name = match proposed_mod_path.segments().last() { | 189 | let proposed_import_name = match proposed_mod_path.segments().last() { |
191 | Some(name) => name.to_string().to_lowercase(), | 190 | Some(name) => name.to_string().to_lowercase(), |
192 | None => return usize::MAX, | 191 | None => return usize::MAX, |
@@ -200,7 +199,6 @@ fn compute_fuzzy_completion_order_key( | |||
200 | #[cfg(test)] | 199 | #[cfg(test)] |
201 | mod tests { | 200 | mod tests { |
202 | use expect_test::{expect, Expect}; | 201 | use expect_test::{expect, Expect}; |
203 | use test_utils::mark; | ||
204 | 202 | ||
205 | use crate::{ | 203 | use crate::{ |
206 | item::CompletionKind, | 204 | item::CompletionKind, |
@@ -295,7 +293,7 @@ fn main() { | |||
295 | 293 | ||
296 | #[test] | 294 | #[test] |
297 | fn short_paths_are_ignored() { | 295 | fn short_paths_are_ignored() { |
298 | mark::check!(ignore_short_input_for_path); | 296 | cov_mark::check!(ignore_short_input_for_path); |
299 | 297 | ||
300 | check( | 298 | check( |
301 | r#" | 299 | r#" |
@@ -319,7 +317,7 @@ fn main() { | |||
319 | 317 | ||
320 | #[test] | 318 | #[test] |
321 | fn fuzzy_completions_come_in_specific_order() { | 319 | fn fuzzy_completions_come_in_specific_order() { |
322 | mark::check!(certain_fuzzy_order_test); | 320 | cov_mark::check!(certain_fuzzy_order_test); |
323 | check( | 321 | check( |
324 | r#" | 322 | r#" |
325 | //- /lib.rs crate:dep | 323 | //- /lib.rs crate:dep |