mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Small fixes
This commit is contained in:
parent
01ad453285
commit
c03f5b63e2
2 changed files with 6 additions and 6 deletions
|
@ -1060,7 +1060,7 @@ pub(crate) fn handle_completion_resolve(
|
|||
forced_resolve_completions_config.fields_to_resolve = CompletionFieldsToResolve::empty();
|
||||
|
||||
let position = FilePosition { file_id, offset };
|
||||
let Some(unresolved_completions) = snap.analysis.completions(
|
||||
let Some(resolved_completions) = snap.analysis.completions(
|
||||
&forced_resolve_completions_config,
|
||||
position,
|
||||
resolve_data.trigger_character,
|
||||
|
@ -1075,7 +1075,7 @@ pub(crate) fn handle_completion_resolve(
|
|||
snap.file_version(position.file_id),
|
||||
resolve_data.position,
|
||||
resolve_data.trigger_character,
|
||||
unresolved_completions,
|
||||
resolved_completions,
|
||||
);
|
||||
let Some(mut resolved_completion) = resolved_completions.into_iter().find(|completion| {
|
||||
completion.label == original_completion.label
|
||||
|
|
|
@ -286,12 +286,12 @@ fn completion_item(
|
|||
Some(item.lookup().to_owned())
|
||||
};
|
||||
|
||||
// LSP does not allow arbitrary edits in completion, so we have to do a
|
||||
// non-trivial mapping here.
|
||||
let text_edit = if fields_to_resolve.resolve_text_edit {
|
||||
something_to_resolve = true;
|
||||
None
|
||||
} else {
|
||||
// LSP does not allow arbitrary edits in completion, so we have to do a
|
||||
// non-trivial mapping here.
|
||||
let mut text_edit = None;
|
||||
let source_range = item.source_range;
|
||||
for indel in item.text_edit {
|
||||
|
@ -327,9 +327,9 @@ fn completion_item(
|
|||
let command = if item.trigger_call_info && config.client_commands().trigger_parameter_hints {
|
||||
if fields_to_resolve.resolve_command {
|
||||
something_to_resolve = true;
|
||||
Some(command::trigger_parameter_hints())
|
||||
} else {
|
||||
None
|
||||
} else {
|
||||
Some(command::trigger_parameter_hints())
|
||||
}
|
||||
} else {
|
||||
None
|
||||
|
|
Loading…
Reference in a new issue