mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-23 13:13:17 +00:00
Fix last chain item shape for Visual indent_style
This commit is contained in:
parent
abcdc0fadd
commit
4b4fb557d7
@ -614,6 +614,12 @@ impl<'a> ChainFormatterShared<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
let last_shape = if context.use_block_indent() {
|
||||
last_shape
|
||||
} else {
|
||||
child_shape.sub_width(shape.rhs_overhead(context.config) + last.tries)?
|
||||
};
|
||||
|
||||
last_subexpr_str = last_subexpr_str.or_else(|| last.rewrite(context, last_shape));
|
||||
self.rewrites.push(last_subexpr_str?);
|
||||
Some(())
|
||||
|
Loading…
Reference in New Issue
Block a user