about summary refs log tree commit diff
diff options
context:
space:
mode:
authoradamrk <ark.email@gmail.com>2020-02-16 16:33:15 +0100
committeradamrk <ark.email@gmail.com>2020-02-16 16:33:15 +0100
commite88eb89132d2407614aebee1b43472b577a2394c (patch)
treedc128f32b9d5dfee531fcd8d9f2a761c9e8db72f
parent68d3743faf51926f0a63207686f860bdffafe0d7 (diff)
downloadrust-e88eb89132d2407614aebee1b43472b577a2394c.tar.gz
rust-e88eb89132d2407614aebee1b43472b577a2394c.zip
add space before/after wrapping braces
-rw-r--r--crates/ra_ide/src/completion/presentation.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide/src/completion/presentation.rs b/crates/ra_ide/src/completion/presentation.rs
index 4de09d82cf4..1a3bcffaeb2 100644
--- a/crates/ra_ide/src/completion/presentation.rs
+++ b/crates/ra_ide/src/completion/presentation.rs
@@ -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 }",
             },
         ]"###
         );