diff options
Diffstat (limited to 'crates/completion/src/render')
-rw-r--r-- | crates/completion/src/render/function.rs | 4 | ||||
-rw-r--r-- | crates/completion/src/render/pattern.rs | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/crates/completion/src/render/function.rs b/crates/completion/src/render/function.rs index 081be14f4..7b2f62b4b 100644 --- a/crates/completion/src/render/function.rs +++ b/crates/completion/src/render/function.rs | |||
@@ -113,7 +113,7 @@ mod tests { | |||
113 | use test_utils::mark; | 113 | use test_utils::mark; |
114 | 114 | ||
115 | use crate::{ | 115 | use crate::{ |
116 | test_utils::{check_edit, check_edit_with_config}, | 116 | test_utils::{check_edit, check_edit_with_config, TEST_CONFIG}, |
117 | CompletionConfig, | 117 | CompletionConfig, |
118 | }; | 118 | }; |
119 | 119 | ||
@@ -211,7 +211,7 @@ fn main() { S::foo(${1:&self})$0 } | |||
211 | fn suppress_arg_snippets() { | 211 | fn suppress_arg_snippets() { |
212 | mark::check!(suppress_arg_snippets); | 212 | mark::check!(suppress_arg_snippets); |
213 | check_edit_with_config( | 213 | check_edit_with_config( |
214 | CompletionConfig { add_call_argument_snippets: false, ..CompletionConfig::default() }, | 214 | CompletionConfig { add_call_argument_snippets: false, ..TEST_CONFIG }, |
215 | "with_args", | 215 | "with_args", |
216 | r#" | 216 | r#" |
217 | fn with_args(x: i32, y: String) {} | 217 | fn with_args(x: i32, y: String) {} |
diff --git a/crates/completion/src/render/pattern.rs b/crates/completion/src/render/pattern.rs index a3b6a3cac..61d8a17e5 100644 --- a/crates/completion/src/render/pattern.rs +++ b/crates/completion/src/render/pattern.rs | |||
@@ -1,12 +1,10 @@ | |||
1 | //! Renderer for patterns. | 1 | //! Renderer for patterns. |
2 | 2 | ||
3 | use hir::{db::HirDatabase, HasAttrs, HasVisibility, Name, StructKind}; | 3 | use hir::{db::HirDatabase, HasAttrs, HasVisibility, Name, StructKind}; |
4 | use ide_db::helpers::SnippetCap; | ||
4 | use itertools::Itertools; | 5 | use itertools::Itertools; |
5 | 6 | ||
6 | use crate::{ | 7 | use crate::{item::CompletionKind, render::RenderContext, CompletionItem, CompletionItemKind}; |
7 | config::SnippetCap, item::CompletionKind, render::RenderContext, CompletionItem, | ||
8 | CompletionItemKind, | ||
9 | }; | ||
10 | 8 | ||
11 | fn visible_fields( | 9 | fn visible_fields( |
12 | ctx: &RenderContext<'_>, | 10 | ctx: &RenderContext<'_>, |