mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Minor, more orthogonal code
It's better to accept things as arguments rather than store them.
This commit is contained in:
parent
17f236c2b0
commit
076945e47c
4 changed files with 12 additions and 16 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue