aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/complete_snippet.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_snippet.rs')
-rw-r--r--crates/ra_ide_api/src/completion/complete_snippet.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_snippet.rs b/crates/ra_ide_api/src/completion/complete_snippet.rs
index a35f31511..b06221c2a 100644
--- a/crates/ra_ide_api/src/completion/complete_snippet.rs
+++ b/crates/ra_ide_api/src/completion/complete_snippet.rs
@@ -40,7 +40,7 @@ fn ${1:feature}() {
40#[cfg(test)] 40#[cfg(test)]
41mod tests { 41mod tests {
42 use crate::completion::{do_completion, CompletionItem, CompletionKind}; 42 use crate::completion::{do_completion, CompletionItem, CompletionKind};
43 use insta::assert_debug_snapshot_matches; 43 use insta::assert_debug_snapshot;
44 44
45 fn do_snippet_completion(code: &str) -> Vec<CompletionItem> { 45 fn do_snippet_completion(code: &str) -> Vec<CompletionItem> {
46 do_completion(code, CompletionKind::Snippet) 46 do_completion(code, CompletionKind::Snippet)
@@ -48,7 +48,7 @@ mod tests {
48 48
49 #[test] 49 #[test]
50 fn completes_snippets_in_expressions() { 50 fn completes_snippets_in_expressions() {
51 assert_debug_snapshot_matches!( 51 assert_debug_snapshot!(
52 do_snippet_completion(r"fn foo(x: i32) { <|> }"), 52 do_snippet_completion(r"fn foo(x: i32) { <|> }"),
53 @r#"[ 53 @r#"[
54 CompletionItem { 54 CompletionItem {
@@ -71,11 +71,11 @@ mod tests {
71 71
72 #[test] 72 #[test]
73 fn should_not_complete_snippets_in_path() { 73 fn should_not_complete_snippets_in_path() {
74 assert_debug_snapshot_matches!( 74 assert_debug_snapshot!(
75 do_snippet_completion(r"fn foo(x: i32) { ::foo<|> }"), 75 do_snippet_completion(r"fn foo(x: i32) { ::foo<|> }"),
76 @r#"[]"# 76 @r#"[]"#
77 ); 77 );
78 assert_debug_snapshot_matches!( 78 assert_debug_snapshot!(
79 do_snippet_completion(r"fn foo(x: i32) { ::<|> }"), 79 do_snippet_completion(r"fn foo(x: i32) { ::<|> }"),
80 @r#"[]"# 80 @r#"[]"#
81 ); 81 );
@@ -83,7 +83,7 @@ mod tests {
83 83
84 #[test] 84 #[test]
85 fn completes_snippets_in_items() { 85 fn completes_snippets_in_items() {
86 assert_debug_snapshot_matches!( 86 assert_debug_snapshot!(
87 do_snippet_completion( 87 do_snippet_completion(
88 r" 88 r"
89 #[cfg(test)] 89 #[cfg(test)]