mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-14 04:56:49 +00:00
Allow overflowing the last item of chain only if it is multi-lined
By multi-lined we mean if it has more than 3 lines.
This commit is contained in:
parent
02c1996e3e
commit
d3d31a9f75
@ -348,7 +348,7 @@ fn rewrite_last_child_with_overflow(
|
||||
) -> bool {
|
||||
if let Some(shape) = shape.shrink_left(almost_total) {
|
||||
if let Some(ref mut rw) = rewrite_chain_subexpr(expr, span, context, shape) {
|
||||
if almost_total + first_line_width(rw) <= one_line_budget {
|
||||
if almost_total + first_line_width(rw) <= one_line_budget && rw.lines().count() > 3 {
|
||||
::std::mem::swap(last_child, rw);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user