From a53be867105394f09c33d929535d37bc6522ff8b Mon Sep 17 00:00:00 2001 From: Marcus Klaas Date: Wed, 9 Sep 2015 23:10:51 +0200 Subject: [PATCH] address mini offset bug in rewrite_match --- src/expr.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/expr.rs b/src/expr.rs index 710fb6f87038..353150197b11 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -732,6 +732,7 @@ impl Rewrite for ast::Arm { // Let's try and get the arm body on the same line as the condition. // 4 = ` => `.len() if context.config.max_width > line_start + comma.len() + 4 { + let inner_offset = line_start + 4; let budget = context.config.max_width - line_start - comma.len() - 4; if let Some(ref body_str) = body.rewrite(context, budget,