diff options
| author | Nick Cameron <nrc@ncameron.org> | 2018-10-16 09:01:40 +1300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-16 09:01:40 +1300 |
| commit | bc4414e53ce4e56856c360bf3a5e6c98fe072761 (patch) | |
| tree | 6345e839776d5970ce04c4700c47102a6ce86cb1 /src/expr.rs | |
| parent | 075aa909cd2bcdc603f45e0b65119c6a7e3b2030 (diff) | |
| parent | 7be173eb8c9e043fbe814970c93dc7d98ddc8009 (diff) | |
Merge pull request #3101 from nrc/pair-newline
Simplify multi-lining binop exprs
Diffstat (limited to 'src/expr.rs')
| -rw-r--r-- | src/expr.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/expr.rs b/src/expr.rs index 752fb792899..82d2a43ad07 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -898,10 +898,11 @@ impl<'a> ControlFlow<'a> { let trial = self.rewrite_single_line(&pat_expr_string, context, shape.width); if let Some(cond_str) = trial { - if cond_str.len() <= context - .config - .width_heuristics() - .single_line_if_else_max_width + if cond_str.len() + <= context + .config + .width_heuristics() + .single_line_if_else_max_width { return Some((cond_str, 0)); } |
