Skip to content

Commit e84e01c

Browse files
committed
Use context.budget()
1 parent 792f48c commit e84e01c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/expr.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,9 +1450,8 @@ fn rewrite_match(
14501450

14511451
// Do not take the rhs overhead from the upper expressions into account
14521452
// when rewriting match condition.
1453-
let new_width = context.config.max_width().checked_sub(shape.used_width())?;
14541453
let cond_shape = Shape {
1455-
width: new_width,
1454+
width: context.budget(shape.used_width()),
14561455
..shape
14571456
};
14581457
// 6 = `match `

0 commit comments

Comments
 (0)