]> git.lizzy.rs Git - rust.git/commit
Auto merge of #1850 - RalfJung:fmt, r=RalfJung
authorbors <bors@rust-lang.org>
Mon, 12 Jul 2021 16:26:02 +0000 (16:26 +0000)
committerbors <bors@rust-lang.org>
Mon, 12 Jul 2021 16:26:02 +0000 (16:26 +0000)
commita4a9a36d20eb59e38773bac8c5ddeb26d3da08bd
tree309218fc2eaea273f64a60b75d451d41803de0af
parentb06130762ed75f52da7c22979c61c597ced667c6
parentcffa1d325c7c5a0d9e28f0419d05cf0afe1d3504
Auto merge of #1850 - RalfJung:fmt, r=RalfJung

fmt: set force_multiline_blocks=true

This is an experiment, I am not yet sure if I like it... but it does prevent rustfmt from putting stuff after the `=>` in a `match` (unless the entire arm fits there), which IMO is a big plus. What do others think?
(I also tried setting `match_arm_blocks` back to its default of `true`, but that adds too many braces for my taste.)

Btw, `@calebcartwright` is the interaction of `match_arm_blocks = false` and `force_multiline_blocks = true` as can be seen here expected? I think I like it, but it it is not at all what I expected from the docs which describe `force_multiline_blocks = true` as "Force multiline closure and match arm bodies to be wrapped in a block" -- but here that is not the effect it has, there are no new blocks being added.