aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/completions/snippet.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-01-06 17:43:46 +0000
committerAleksey Kladov <[email protected]>2021-01-06 18:22:24 +0000
commitf8a056117898c56d34d1758455bc54df50e2e426 (patch)
tree429e2c7284476213432b66b02ab9b76f6525eb92 /crates/completion/src/completions/snippet.rs
parent7ae4b8bdb62735ee767dff25ce1485ae8bffe199 (diff)
Align config's API with usage
The config now is mostly immutable, optimize for that.
Diffstat (limited to 'crates/completion/src/completions/snippet.rs')
-rw-r--r--crates/completion/src/completions/snippet.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/completion/src/completions/snippet.rs b/crates/completion/src/completions/snippet.rs
index 842590130..b5e704696 100644
--- a/crates/completion/src/completions/snippet.rs
+++ b/crates/completion/src/completions/snippet.rs
@@ -1,8 +1,10 @@
1//! This file provides snippet completions, like `pd` => `eprintln!(...)`. 1//! This file provides snippet completions, like `pd` => `eprintln!(...)`.
2 2
3use ide_db::helpers::SnippetCap;
4
3use crate::{ 5use crate::{
4 config::SnippetCap, item::Builder, CompletionContext, CompletionItem, CompletionItemKind, 6 item::Builder, CompletionContext, CompletionItem, CompletionItemKind, CompletionKind,
5 CompletionKind, Completions, 7 Completions,
6}; 8};
7 9
8fn snippet(ctx: &CompletionContext, cap: SnippetCap, label: &str, snippet: &str) -> Builder { 10fn snippet(ctx: &CompletionContext, cap: SnippetCap, label: &str, snippet: &str) -> Builder {