Use correct width
When rewriting trait bounds on the next line, we do not want to add an extra indentation. However, the max width should be smaller.
This commit is contained in:
parent
fdfb489c48
commit
5f5d04283c
1 changed files with 3 additions and 1 deletions
|
@ -1937,7 +1937,9 @@ fn shape_from_rhs_tactic(
|
||||||
rhs_tactic: RhsTactics,
|
rhs_tactic: RhsTactics,
|
||||||
) -> Option<Shape> {
|
) -> Option<Shape> {
|
||||||
match rhs_tactic {
|
match rhs_tactic {
|
||||||
RhsTactics::ForceNextLineWithoutIndent => Some(shape.with_max_width(context.config)),
|
RhsTactics::ForceNextLineWithoutIndent => shape
|
||||||
|
.with_max_width(context.config)
|
||||||
|
.sub_width(shape.indent.width()),
|
||||||
RhsTactics::Default => {
|
RhsTactics::Default => {
|
||||||
Shape::indented(shape.indent.block_indent(context.config), context.config)
|
Shape::indented(shape.indent.block_indent(context.config), context.config)
|
||||||
.sub_width(shape.rhs_overhead(context.config))
|
.sub_width(shape.rhs_overhead(context.config))
|
||||||
|
|
Loading…
Reference in a new issue