From e84e01c4428d1a16c04597e963d16bdb6427e9c7 Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Mon, 30 Oct 2017 23:31:20 +0900 Subject: [PATCH] Use context.budget() --- src/expr.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/expr.rs b/src/expr.rs index 9a0206469275..67f8af1abbd1 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -1450,9 +1450,8 @@ fn rewrite_match( // Do not take the rhs overhead from the upper expressions into account // when rewriting match condition. - let new_width = context.config.max_width().checked_sub(shape.used_width())?; let cond_shape = Shape { - width: new_width, + width: context.budget(shape.used_width()), ..shape }; // 6 = `match `