-
Notifications
You must be signed in to change notification settings - Fork 913
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] loop_brace_style #5448
Comments
Thanks for reaching out the |
@liam-clink, let me know what your thoughts are. It would also be great to get a little more detail on your motivation for controling the brace style of I Also want to mention that rustfmt is an implementation of the rust style guide, and the section on |
What I was saying is that there is no option to change loop brace style, not that control flow braces should affect that. I find vertically aligned braces to be more readable in general, that's all. I know what the style guide says, and if I were contributing to an existing project I would follow the existing style. Just want this for my own projects, and if anyone wants to contribute to them, keeping formatting consistent using rustfmt |
I apologize, it seems that ordinary loops do already work, but I had a closure with a loop in it inside a function, which made me think loops weren't supported. The documentation doesn't mention loops, only functions structs and enums, so I believe this should be closed and an issue opened on the repo for the website, correct? |
If It might also be worth opening up a separate issue to discuss the problem you encountered with the loop inside the closure. Without seeing a code snippet it's tough to say what's going on. |
Thanks for reaching out, but I am going to close given the above discussion. @liam-clink - as @ytmimi already noted There's broader discussion about brace style contexts in other positions in #3376 |
Loops are not included in the brace_style or control_brace_style
The text was updated successfully, but these errors were encountered: