Use context.budget()

This commit is contained in:
Seiichi Uchida 2017-10-30 23:31:20 +09:00
parent 792f48c976
commit e84e01c442

View file

@ -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 `