Minor, more orthogonal code

It's better to accept things as arguments rather than store them.
This commit is contained in:
Aleksey Kladov 2020-12-10 18:00:28 +03:00
parent 17f236c2b0
commit 076945e47c
4 changed files with 12 additions and 16 deletions

View file

@ -153,9 +153,7 @@ pub fn resolve_completion_edits(
})
.find(|mod_path| mod_path.to_string() == full_import_path)?;
ImportEdit { import_path, import_scope, merge_behavior: config.merge }
.to_text_edit()
.map(|edit| vec![edit])
ImportEdit { import_path, import_scope }.to_text_edit(config.merge).map(|edit| vec![edit])
}
#[cfg(test)]