Skip to content

Commit

Permalink
Fixing binop_separator="Back" for ranges
Browse files Browse the repository at this point in the history
Hardcoded Separator::Place=Front in call to rewrite_pair for range
caused binop_separator="Back" to be hendled incorrectly

Fixed rewrite_pair call and the example in Configuration.md showing
the faulty behaviour
  • Loading branch information
Chris Stinson committed Jan 16, 2018
1 parent 13a0bb9 commit 4c4e079
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Configurations.md
Expand Up @@ -341,8 +341,8 @@ fn main() {
let sum = 123456789012345678901234567890 + 123456789012345678901234567890 +
123456789012345678901234567890;

let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
..bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; // 🐜 See #2364.
let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
}
```

Expand Down
2 changes: 1 addition & 1 deletion src/expr.rs
Expand Up @@ -250,7 +250,7 @@ pub fn format_expr(
PairParts::new("", &sp_delim, ""),
context,
shape,
SeparatorPlace::Front,
context.config.binop_separator(),
)
}
(None, Some(rhs)) => {
Expand Down

0 comments on commit 4c4e079

Please sign in to comment.