mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Keep the original completion order in tests
This commit is contained in:
parent
5fa078f26f
commit
8c292e3cc5
12 changed files with 199 additions and 200 deletions
|
@ -47,9 +47,8 @@ pub(crate) fn completion_list_with_config(
|
|||
code: &str,
|
||||
kind: CompletionKind,
|
||||
) -> String {
|
||||
let mut kind_completions: Vec<CompletionItem> =
|
||||
let kind_completions: Vec<CompletionItem> =
|
||||
get_all_items(config, code).into_iter().filter(|c| c.completion_kind == kind).collect();
|
||||
kind_completions.sort_by_key(|c| c.label().to_owned());
|
||||
let label_width = kind_completions
|
||||
.iter()
|
||||
.map(|it| monospace_width(it.label()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue