Gives up on chains if any line is too long.
If there is a method call chain, and just one call exceeds max_width, it seems like rustfmt gives up and doesn't format anything. Example: ```rust fn f() { foo("This text is under the max_width limit, and shouldn't cause any problems on its own.").long("But this line is extra long, and doesn't fit within 100 max_width. 1234567890123456789").baz().collect().unwrap(); } ``` No format changes will be applied to this. I'm also a bit surprised that `error_on_line_overflow` does not complain. I would expect it to wrap each call chain element, even if one of them is too long, such as: ```rust fn f() { foo("This text is under the max_width limit, and shouldn't cause any problems on its own.") .long("But this line is extra long, and doesn't fit within 100 max_width. 1234567890123456789") .baz() .collect() .unwrap(); } ``` All default settings. rustfmt 1.4.8-nightly (afb1ee1c 2019-09-08)
Posted by ehuss on Oct 14, 2019, 9:07 PM
Tags
Related issues
- struct's lifetime requirements can be bypassed via covariant field assignment
- Proposal to Reorganize the Moderation Team and Review Moderation Policies
- Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
- proposal: container/...: generic collection types
- Better Custom Endpoint BYOK
- A concrete policy for backward compatibility until Godot 5.0
Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments
github (Other)
struct's lifetime requirements can be bypassed via covariant field assignment
Proposal to Reorganize the Moderation Team and Review Moderation Policies
Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
proposal: container/...: generic collection types
Better Custom Endpoint BYOK
A concrete policy for backward compatibility until Godot 5.0
New MTP models not supported
Tracking: 429 / Capacity Issues
Gives up on chains if any line is too long.
If there is a method call chain, and just one call exceeds max_width, it seems like rustfmt gives up and doesn't format anything. Example: ```rust fn f() { foo("This text is under the max_width limit, and shouldn't cause any problems on its own.").long("But this line is extra long, and doesn't fit within 100 max_width. 1234567890123456789").baz().collect().unwrap(); } ``` No format changes will be applied to this. I'm also a bit surprised that `error_on_line_overflow` does not complain. I would expect it to wrap each call chain element, even if one of them is too long, such as: ```rust fn f() { foo("This text is under the max_width limit, and shouldn't cause any problems on its own.") .long("But this line is extra long, and doesn't fit within 100 max_width. 1234567890123456789") .baz() .collect() .unwrap(); } ``` All default settings. rustfmt 1.4.8-nightly (afb1ee1c 2019-09-08)
Comments (0)
No comments yet. Start the discussion.