The block must remain there, or the semantics will change.
The amount of variables declared inside the branch block will change when curly braces are removed. Potentially with conflicting / hiding (lambdas) variables, this can lead to surprises.
To remove curly braces, place the cursor on one and press Alt-Enter, 'Remove Braces'
Re-insert curly braces: select a code block, Ctrl-Alt-J, 7 to surround with a block :)
source share