Fixes to autofmt, make it more aggressive (#2230)
* fix: fmt unterminated if, be more aggressive with line splits * Fix: Handle long exprs in for/if statements
This commit is contained in:
1 parent
46b0eeb12c
commit
be99e29e5f
31 files changed
+464
-117
No files matched your search
@@ -0,0 +1,31 @@
|
||||
//! Exprs that are too long to fit on one line
|
||||
|
||||
fn it_works() {
|
||||
rsx! {
|
||||
div {
|
||||
if thing
|
||||
.some_long_method_that_is_too_long_to_fit_on_one_line()
|
||||
.some_long_method_that_is_too_long_to_fit_on_one_line()
|
||||
.some_long_method_that_is_too_long_to_fit_on_one_line({
|
||||
chain()
|
||||
.some_long_method_that_is_too_long_to_fit_on_one_line()
|
||||
.some_long_method_that_is_too_long_to_fit_on_one_line()
|
||||
})
|
||||
{
|
||||
"hi"
|
||||
}
|
||||
|
||||
for item in thing
|
||||
.some_long_method_that_is_too_long_to_fit_on_one_line()
|
||||
.some_long_method_that_is_too_long_to_fit_on_one_line()
|
||||
.some_long_method_that_is_too_long_to_fit_on_one_line({
|
||||
chain()
|
||||
.some_long_method_that_is_too_long_to_fit_on_one_line()
|
||||
.some_long_method_that_is_too_long_to_fit_on_one_line()
|
||||
})
|
||||
{
|
||||
"hi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user