about summary refs log tree commit diff
path: root/src/lists.rs
diff options
context:
space:
mode:
authorSeiichi Uchida <topecongiro@localhost.localdomain>2017-06-10 22:20:11 +0900
committerSeiichi Uchida <topecongiro@localhost.localdomain>2017-06-10 22:20:11 +0900
commitf2838595d56124548f403a81715627872a4f93ba (patch)
treebbd05d3e3ef1cea8cd5fa936bbb80e58a5dbc267 /src/lists.rs
parentc879d5ebd719875cf99bda55e577df07b28f6ea6 (diff)
Add visual offset when using struct_lit_style is Visual
Diffstat (limited to 'src/lists.rs')
-rw-r--r--src/lists.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lists.rs b/src/lists.rs
index 978d9dbaceb..ec4427032e5 100644
--- a/src/lists.rs
+++ b/src/lists.rs
@@ -529,7 +529,8 @@ pub fn struct_lit_shape(shape: Shape,
                         -> Option<(Option<Shape>, Shape)> {
     let v_shape = match context.config.struct_lit_style() {
         IndentStyle::Visual => {
-            try_opt!(try_opt!(shape.shrink_left(prefix_width)).sub_width(suffix_width))
+            try_opt!(try_opt!(shape.visual_indent(0).shrink_left(prefix_width))
+                         .sub_width(suffix_width))
         }
         IndentStyle::Block => {
             let shape = shape.block_indent(context.config.tab_spaces());