Skip to content

Commit

Permalink
Merge pull request #45 from dtolnay/armexpr
Browse files Browse the repository at this point in the history
Improve formatting of line-wrapped match arms
  • Loading branch information
dtolnay committed Mar 25, 2023
2 parents c08cb35 + 083de82 commit 68f001b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 33 deletions.
3 changes: 1 addition & 2 deletions cargo-expand/serde-1.0.137.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 24 additions & 30 deletions cargo-expand/serde_derive-1.0.137.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/expr.rs
Expand Up @@ -819,7 +819,7 @@ impl Printer {
pre_break: Some('{'),
..BreakToken::default()
});
self.expr(body);
self.expr_beginning_of_line(body, true);
self.scan_break(BreakToken {
offset: -INDENT,
pre_break: stmt::add_semi(body).then(|| ';'),
Expand Down

0 comments on commit 68f001b

Please sign in to comment.