mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Do not insert a newline after ;
if the next token is a }
This creates double newline.
This commit is contained in:
parent
e295f0c29c
commit
26b5f1f92f
2 changed files with 3 additions and 4 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue