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
A lot of the assert! calls in my code are just too long to fit on a single line, but that "tiny first and last argument, big middle one" structure produces a lot of wasted space for tall layouts.
For asserts of the form "Failed to foo. Got {}", it also has the benefit that the variable name is right next to the substitution placeholder, rather than requiring a full-width visual CRLF.
In Rust, it's annoying to have to throw out rustfmt's attempts to change these every time I run it and it'd be nice if there were some kind of layout option which left them intact.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
A lot of the
assert!
calls in my code are just too long to fit on a single line, but that "tiny first and last argument, big middle one" structure produces a lot of wasted space for tall layouts.In my Python programs, I resolve this sort of issue by using a word-wrap-esque style like this:
...or, in rare situations when the above isn't any better, like this...
For asserts of the form "Failed to foo. Got {}", it also has the benefit that the variable name is right next to the substitution placeholder, rather than requiring a full-width visual CRLF.
In Rust, it's annoying to have to throw out rustfmt's attempts to change these every time I run it and it'd be nice if there were some kind of layout option which left them intact.
The text was updated successfully, but these errors were encountered: