false,
true,
mk_sp(else_block.span.lo(), self.span.hi()),
- ).rewrite(context, shape)
+ )
+ .rewrite(context, shape)
}
ast::ExprKind::If(ref cond, ref if_block, ref next_else_block) => {
ControlFlow::new_if(
false,
true,
mk_sp(else_block.span.lo(), self.span.hi()),
- ).rewrite(context, shape)
+ )
+ .rewrite(context, shape)
}
_ => {
last_in_chain = true;
new_indent.to_string(context.config),
line.trim_left()
)
- }).collect::<Vec<_>>()
+ })
+ .collect::<Vec<_>>()
.join("\n")
.trim_left(),
);
.offset_left(offset)
.and_then(|shape| shape.sub_width(1 + rhs_overhead))
} else {
- shape.visual_indent(offset).sub_width(offset + 1)
+ match context.config.indent_style() {
+ IndentStyle::Block => shape
+ .offset_left(offset)
+ .and_then(|shape| shape.sub_width(1)),
+ IndentStyle::Visual => shape.visual_indent(offset).sub_width(offset + 1),
+ }
};
let orig_index_rw = index_shape.and_then(|s| index.rewrite(context, s));