HasSource::source -> HasSource::source_old

To start migrating HasSource::source to return an Option.
This commit is contained in:
Nick Spain 2021-01-01 13:05:28 +11:00
parent aa3ce16f26
commit 27cadcd531
15 changed files with 55 additions and 55 deletions

View file

@ -156,7 +156,7 @@ fn add_function_impl(
};
let range = TextRange::new(fn_def_node.text_range().start(), ctx.source_range().end());
let function_decl = function_declaration(&func.source(ctx.db).value);
let function_decl = function_declaration(&func.source_old(ctx.db).value);
match ctx.config.snippet_cap {
Some(cap) => {
let snippet = format!("{} {{\n $0\n}}", function_decl);
@ -200,7 +200,7 @@ fn add_const_impl(
let const_name = const_.name(ctx.db).map(|n| n.to_string());
if let Some(const_name) = const_name {
let snippet = make_const_compl_syntax(&const_.source(ctx.db).value);
let snippet = make_const_compl_syntax(&const_.source_old(ctx.db).value);
let range = TextRange::new(const_def_node.text_range().start(), ctx.source_range().end());