You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to define the formatting strategy for function calls. It does not currently exist in the style guide
Basic idea
Method 1:
very_long_module_name::this_is_a_really_long_function(arg1,
arg2,
arg3,
"this is a raw s\
tring and is ter\
ible")
should instead be Method 2:
very_long_module_name::this_is_a_really_long_function(
arg1, arg2, arg3,
"this is a raw string and is terible")
rustfmt currently uses the Method 1 way too often. I'm not sure the right balance here. Like @joshtriplett said in #47 , you really want to define "simple". IMO "simple" would be:
If the function and all args fit within the line length, just do that.
Otherwise use Method 1 if Method 1 only takes up two lines
Otherwise use Method 2:
arguments always start on their own indented line
arguments are listed normally as long as they don't go over the line length limit
any argument that would go over the line length limit goes on it's own line
anything over 25 characters goes on it's own line
The text was updated successfully, but these errors were encountered:
I would like to define the formatting strategy for function calls. It does not currently exist in the style guide
Basic idea
Method 1:
should instead be Method 2:
rustfmt currently uses the Method 1 way too often. I'm not sure the right balance here. Like @joshtriplett said in #47 , you really want to define "simple". IMO "simple" would be:
The text was updated successfully, but these errors were encountered: