]> git.lizzy.rs Git - rust.git/commit
Fix join_lines not adding a comma after join_single_expr_block in match arm
authorVille Penttinen <villem.penttinen@gmail.com>
Thu, 21 Feb 2019 15:51:41 +0000 (17:51 +0200)
committerVille Penttinen <villem.penttinen@gmail.com>
Thu, 21 Feb 2019 15:55:14 +0000 (17:55 +0200)
commit40add5de9a717cb784dde3310ace8d61edd2dde4
treef4e6fc99f8ee9ec2576d41942aa3fd114e32feea
parent5cacdfcb3c666161dc41f59228eaaca5cfe8fc27
Fix join_lines not adding a comma after join_single_expr_block in match arm

We will also remove optional whitespace between the expression and the comma.

e.g.

```rust
fn foo() {
    let x = (<|>{
       4
    }   ,); // NOTE: whitespace
}
```

becomes

```rust
fn foo() {
    let x = (<|>4,);
}
```
crates/ra_ide_api_light/src/join_lines.rs