Avoid a couple of allocations

This commit is contained in:
Laurențiu Nicola 2020-12-29 14:35:49 +02:00
parent ef1177c5b5
commit 42c24ff25f
10 changed files with 61 additions and 60 deletions

View file

@ -137,7 +137,7 @@ pub fn resolve_completion_edits(
config: &CompletionConfig,
position: FilePosition,
full_import_path: &str,
imported_name: &str,
imported_name: String,
) -> Option<Vec<TextEdit>> {
let ctx = CompletionContext::new(db, position, config)?;
let anchor = ctx.name_ref_syntax.as_ref()?;