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
None of the lines in the Input violate the line length requirements. Thus, I would expect that code is most legible if it has a consistent style and function parameters and return types are placed similarly. Instead, it changes the output to have all three different styles. Another acceptable output would be to change all or at least the second and third method to the fully expanded style.
HeroicKatora
changed the title
rustfmt should value internal consistency
rustfmt should value internal consistency in trait method signatures
Nov 25, 2020
Thank you for reaching out @HeroicKatora, however, this is working as designed. The formatting emitted by rustfmt is governed by the Rust Style Guide which prescribes specific formatting guidelines for all code constructs. All of the formatting rules are applied consistently to each node in the AST, and by design those rules are not conditionally applied/broken based on original formatting nor the formatted result of other/"related" elements.
The request here runs counter to the formatting approach of the style guide and thus rustfmt, so going to close this.
Input
Output
Expected output
None of the lines in the Input violate the line length requirements. Thus, I would expect that code is most legible if it has a consistent style and function parameters and return types are placed similarly. Instead, it changes the output to have all three different styles. Another acceptable output would be to change all or at least the second and third method to the fully expanded style.
Meta
1.4.27-nightly (2020-11-16 580d826)
The text was updated successfully, but these errors were encountered: