Do not insert a newline after ; if the next token is a }

This creates double newline.
This commit is contained in:
Chayim Refael Friedman 2022-09-04 14:24:16 +00:00
parent e295f0c29c
commit 26b5f1f92f
2 changed files with 3 additions and 4 deletions

View file

@ -95,7 +95,7 @@ pub fn insert_ws_into(syn: SyntaxNode) -> SyntaxNode {
AS_KW | DYN_KW | IMPL_KW | CONST_KW => {
mods.push(do_ws(after, tok));
}
T![;] => {
T![;] if is_next(|it| it != R_CURLY, true) => {
if indent > 0 {
mods.push(do_indent(after, tok, indent));
}

View file

@ -5166,7 +5166,6 @@ fn main() { $0V; }
```rust
pub static V: i8 = {
let e = 123;
}
```
"#]],