mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Make multiple import edits work for completions
This commit is contained in:
parent
046c85ef0c
commit
454ecd167c
17 changed files with 141 additions and 87 deletions
|
@ -533,19 +533,10 @@ impl Analysis {
|
|||
&self,
|
||||
config: &CompletionConfig,
|
||||
position: FilePosition,
|
||||
full_import_path: &str,
|
||||
imported_name: String,
|
||||
imports: impl IntoIterator<Item = (String, String)> + std::panic::UnwindSafe,
|
||||
) -> Cancellable<Vec<TextEdit>> {
|
||||
Ok(self
|
||||
.with_db(|db| {
|
||||
ide_completion::resolve_completion_edits(
|
||||
db,
|
||||
config,
|
||||
position,
|
||||
full_import_path,
|
||||
imported_name,
|
||||
)
|
||||
})?
|
||||
.with_db(|db| ide_completion::resolve_completion_edits(db, config, position, imports))?
|
||||
.unwrap_or_default())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue