add space before/after wrapping braces

This commit is contained in:
adamrk 2020-02-16 16:33:15 +01:00
parent 68d3743faf
commit e88eb89132

View File

@ -280,7 +280,7 @@ impl Completions {
StructKind::Record => {
join(detail_types.map(|(n, t)| format!("{}: {}", n, t.display(ctx.db).to_string())))
.separator(", ")
.surround_with("{", "}")
.surround_with("{ ", " }")
.to_string()
}
};
@ -328,7 +328,7 @@ mod tests {
delete: [121; 123),
insert: "Foo",
kind: EnumVariant,
detail: "{x: i32, y: i32}",
detail: "{ x: i32, y: i32 }",
},
]"###
);