mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-26 14:43:24 +00:00
Add visual offset when using struct_lit_style is Visual
This commit is contained in:
parent
c879d5ebd7
commit
f2838595d5
@ -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());
|
||||
|
@ -3,5 +3,5 @@
|
||||
|
||||
fn main() {
|
||||
let lorem = Lorem { ipsum: dolor,
|
||||
sit: amet, };
|
||||
sit: amet, };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user