diff options
author | Aleksey Kladov <[email protected]> | 2020-05-19 22:12:01 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-05-20 00:30:12 +0100 |
commit | e6fc0bdffb213f6e94c5bb4081e6d175ccbd518f (patch) | |
tree | 13e97077b33a25d1923d946dfbcf636fea838f9f /crates/ra_assists/src/utils.rs | |
parent | 8eb3272ad6f774bccb967ee640b72a9a17273e7b (diff) |
Moderate cleanup of add_function
Diffstat (limited to 'crates/ra_assists/src/utils.rs')
-rw-r--r-- | crates/ra_assists/src/utils.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/ra_assists/src/utils.rs b/crates/ra_assists/src/utils.rs index bb9749b06..8a26a6808 100644 --- a/crates/ra_assists/src/utils.rs +++ b/crates/ra_assists/src/utils.rs | |||
@@ -11,9 +11,15 @@ use ra_syntax::{ | |||
11 | }; | 11 | }; |
12 | use rustc_hash::FxHashSet; | 12 | use rustc_hash::FxHashSet; |
13 | 13 | ||
14 | use crate::assist_config::SnippetCap; | ||
15 | |||
14 | pub(crate) use insert_use::insert_use_statement; | 16 | pub(crate) use insert_use::insert_use_statement; |
15 | 17 | ||
16 | pub(crate) fn render_snippet(node: &SyntaxNode, placeholder: &SyntaxNode) -> String { | 18 | pub(crate) fn render_snippet( |
19 | _cap: SnippetCap, | ||
20 | node: &SyntaxNode, | ||
21 | placeholder: &SyntaxNode, | ||
22 | ) -> String { | ||
17 | assert!(placeholder.ancestors().any(|it| it == *node)); | 23 | assert!(placeholder.ancestors().any(|it| it == *node)); |
18 | let range = placeholder.text_range() - node.text_range().start(); | 24 | let range = placeholder.text_range() - node.text_range().start(); |
19 | let range: ops::Range<usize> = range.into(); | 25 | let range: ops::Range<usize> = range.into(); |