mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
internal: Simplify some completions
This commit is contained in:
parent
8b078986dc
commit
7a0774defa
11 changed files with 147 additions and 222 deletions
|
@ -148,7 +148,7 @@ pub fn completions(
|
|||
config: &CompletionConfig,
|
||||
position: FilePosition,
|
||||
trigger_character: Option<char>,
|
||||
) -> Option<Completions> {
|
||||
) -> Option<Vec<CompletionItem>> {
|
||||
let (ctx, analysis) = &CompletionContext::new(db, position, config)?;
|
||||
let mut completions = Completions::default();
|
||||
|
||||
|
@ -163,7 +163,7 @@ pub fn completions(
|
|||
}
|
||||
}
|
||||
// prevent `(` from triggering unwanted completion noise
|
||||
return Some(completions);
|
||||
return Some(completions.into());
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -197,7 +197,7 @@ pub fn completions(
|
|||
}
|
||||
}
|
||||
|
||||
Some(completions)
|
||||
Some(completions.into())
|
||||
}
|
||||
|
||||
/// Resolves additional completion data at the position given.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue