Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[unstable option] force_multiline_blocks #3374

Open
scampi opened this issue Feb 13, 2019 · 2 comments
Open

[unstable option] force_multiline_blocks #3374

scampi opened this issue Feb 13, 2019 · 2 comments
Labels
unstable option tracking issue of an unstable option

Comments

@scampi
Copy link
Contributor

scampi commented Feb 13, 2019

Tracking issue for unstable option: force_multiline_blocks

@scampi scampi added the unstable option tracking issue of an unstable option label Feb 13, 2019
@scampi scampi changed the title [unstable option] unstable option: force_multiline_blocks [unstable option] force_multiline_blocks Feb 18, 2019
@marcospb19
Copy link

marcospb19 commented Oct 7, 2021

Please, can this be stabilized? It's been 32 months.

(is there any way I can help?)

@aloucks
Copy link
Contributor

aloucks commented Mar 7, 2025

Right now it seems that when force_multiline_blocks is false (the default), it appears to operate logically as "force_singleline_blocks" = true.

I'll often have matches that look like:

match thing {
  Thing::Foo => small_func(),
  Thing::Bar => {
    a_function();
    b_function();
    c_function()
  }
}

But I'd like them to be formatted like so for consistency:

match thing {
  Thing::Foo => {
    one_func(),
  }
  Thing::Bar => {
    a_function();
    b_function();
    c_function()
  }
}

I could set force_multiline_blocks=true, but this will also force multiline even in places where I don't want it. It would be nice if there was something like "allow_multiline_blocks" that won't force it either way. That is, if the item was written multiline keep it as multiline; if it was written without multiline, keep it without multiline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unstable option tracking issue of an unstable option
Projects
None yet
Development

No branches or pull requests

3 participants