Add option to override single configuration lines for tests
This commit is contained in:
parent
2ef0b17955
commit
8e22a73cb7
14 changed files with 110 additions and 116 deletions
|
@ -617,10 +617,8 @@ fn rewrite_binary_op(context: &RewriteContext,
|
|||
let operator_str = context.codemap.span_to_snippet(op.span).unwrap();
|
||||
|
||||
// 1 = space between lhs expr and operator
|
||||
let mut result =
|
||||
try_opt!(lhs.rewrite(context,
|
||||
context.config.max_width - offset - 1 - operator_str.len(),
|
||||
offset));
|
||||
let max_width = try_opt!(context.config.max_width.checked_sub(operator_str.len() + offset + 1));
|
||||
let mut result = try_opt!(lhs.rewrite(context, max_width, offset));
|
||||
|
||||
result.push(' ');
|
||||
result.push_str(&operator_str);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue