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