Disallow single line chain when the line exceeds the given budget
@@ -181,7 +181,8 @@ pub fn rewrite_chain(expr: &ast::Expr, context: &RewriteContext, shape: Shape) -
let one_line_len = rewrites.iter().fold(0, |a, r| a + first_line_width(r)) +
parent_rewrite.len();
- let veto_single_line = if one_line_len > context.config.chain_one_line_max() {
+ let veto_single_line = if one_line_len > context.config.chain_one_line_max() ||
+ one_line_len > shape.width {
if rewrites.len() > 1 {
true
} else if rewrites.len() == 1 {
