mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
reformat the world
This commit is contained in:
parent
5cb1d41a30
commit
12e3b4c70b
129 changed files with 727 additions and 2509 deletions
|
@ -31,14 +31,10 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
|
|||
hir::ModuleDef::Enum(e) => {
|
||||
e.variants(ctx.db).into_iter().for_each(|variant| {
|
||||
if let Some(name) = variant.name(ctx.db) {
|
||||
let detail_types = variant
|
||||
.fields(ctx.db)
|
||||
.into_iter()
|
||||
.map(|field| field.ty(ctx.db));
|
||||
let detail = join(detail_types)
|
||||
.separator(", ")
|
||||
.surround_with("(", ")")
|
||||
.to_string();
|
||||
let detail_types =
|
||||
variant.fields(ctx.db).into_iter().map(|field| field.ty(ctx.db));
|
||||
let detail =
|
||||
join(detail_types).separator(", ").surround_with("(", ")").to_string();
|
||||
|
||||
CompletionItem::new(
|
||||
CompletionKind::Reference,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue