We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd4dc36 commit c13d245Copy full SHA for c13d245
src/expr.rs
@@ -429,7 +429,7 @@ fn rewrite_empty_block(
429
prefix: &str,
430
shape: Shape,
431
) -> Option<String> {
432
- if !block.stmts.is_empty() {
+ if block_has_statements(&block) {
433
return None;
434
}
435
tests/source/issue_3868.rs
@@ -0,0 +1,13 @@
1
+fn foo() {
2
+ ;
3
+}
4
+
5
+fn bar() {
6
+ for _ in 0..1 {
7
8
+ }
9
10
11
+fn baz() {
12
+ ();
13
tests/target/issue_3868.rs
@@ -0,0 +1,9 @@
+fn foo() {}
+ for _ in 0..1 {}
0 commit comments