about summary refs log tree commit diff
path: root/src/rustfmt_diff.rs
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2018-07-11 21:01:40 +1200
committerNick Cameron <ncameron@mozilla.com>2018-07-24 15:43:29 +1200
commitf0fe9c3c4acb4eafba5a552a2823e6997e75a3f4 (patch)
treef28efab727642d68955b9286b9fac80efd76f4fd /src/rustfmt_diff.rs
parent5bc27593f44a7c2108ca1a69eba2d34b3db90935 (diff)
chains: prefer to use the next line for an expression, if using the same line would introduce an open block or similar
This problem came to light due to the chains changes, but effects other code too. It only happens rarely, e.g.,

before this fix:
```
    match foo {
        MacroArgKind::Delimited(ref delim_tok, ref args) => rewrite_delimited_inner(
            delim_tok,
            args,
        ).map(|(lhs, inner, rhs)| format!("{}{}{}", lhs, inner, rhs)),
    };

```

after:
```
    match foo {
        MacroArgKind::Delimited(ref delim_tok, ref args) => {
            rewrite_delimited_inner(delim_tok, args)
                .map(|(lhs, inner, rhs)| format!("{}{}{}", lhs, inner, rhs))
        }
    }

```
Diffstat (limited to 'src/rustfmt_diff.rs')
0 files changed, 0 insertions, 0 deletions