diff options
author | Nick Spain <[email protected]> | 2021-01-01 02:05:28 +0000 |
---|---|---|
committer | Nick Spain <[email protected]> | 2021-01-02 10:53:51 +0000 |
commit | 27cadcd531c017aa7c78c6f7a36f2b7f2ce8a196 (patch) | |
tree | 24f43261eeafffc8b98be361c9c2841c2e4861f0 /crates/completion/src/completions/trait_impl.rs | |
parent | aa3ce16f2641b7eb562a8eae67738b0ff0c0b7b0 (diff) |
HasSource::source -> HasSource::source_old
To start migrating HasSource::source to return an Option.
Diffstat (limited to 'crates/completion/src/completions/trait_impl.rs')
-rw-r--r-- | crates/completion/src/completions/trait_impl.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/completion/src/completions/trait_impl.rs b/crates/completion/src/completions/trait_impl.rs index c4e0d0669..759253c53 100644 --- a/crates/completion/src/completions/trait_impl.rs +++ b/crates/completion/src/completions/trait_impl.rs | |||
@@ -156,7 +156,7 @@ fn add_function_impl( | |||
156 | }; | 156 | }; |
157 | let range = TextRange::new(fn_def_node.text_range().start(), ctx.source_range().end()); | 157 | let range = TextRange::new(fn_def_node.text_range().start(), ctx.source_range().end()); |
158 | 158 | ||
159 | let function_decl = function_declaration(&func.source(ctx.db).value); | 159 | let function_decl = function_declaration(&func.source_old(ctx.db).value); |
160 | match ctx.config.snippet_cap { | 160 | match ctx.config.snippet_cap { |
161 | Some(cap) => { | 161 | Some(cap) => { |
162 | let snippet = format!("{} {{\n $0\n}}", function_decl); | 162 | let snippet = format!("{} {{\n $0\n}}", function_decl); |
@@ -200,7 +200,7 @@ fn add_const_impl( | |||
200 | let const_name = const_.name(ctx.db).map(|n| n.to_string()); | 200 | let const_name = const_.name(ctx.db).map(|n| n.to_string()); |
201 | 201 | ||
202 | if let Some(const_name) = const_name { | 202 | if let Some(const_name) = const_name { |
203 | let snippet = make_const_compl_syntax(&const_.source(ctx.db).value); | 203 | let snippet = make_const_compl_syntax(&const_.source_old(ctx.db).value); |
204 | 204 | ||
205 | let range = TextRange::new(const_def_node.text_range().start(), ctx.source_range().end()); | 205 | let range = TextRange::new(const_def_node.text_range().start(), ctx.source_range().end()); |
206 | 206 | ||