Replies: 2 comments 3 replies
-
Hmm looking at this code again, perhaps instead of playing with/bypassing rustfmt, the solution to detail-finding woes is to create a helper fn to do all the boilerplate of putting the custom action into the right type. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Seems to be an improvement: 426a0c0 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While reading the auto-cargo-formatted code I sometimes get lost in the copious amounts of whitespace and misalignments obscuring patters, so to make it readable I sometimes reformat to a simple table where it's easy to skip the whole "column" of identical "returns" and only focus on the difference
For example, here it's clear that:
and if you need more details, you could turn wrapping off and stil maintain most of the alignment
The default formatting is all zigzaggy, so harder to see the difference (in one spot
sref
/sref
/sref_slice
is one one line, in another it's spread over two lines, so harder to see that's it's all identical sequence of commands), besides taking more space for empty}
and)))
Now, I'm not suggesting to reformat everything, just wondering whether you'd be open to accepting a few slaps of
#[rustfmt::skip]
here and there to get to the more aligned output(or maybe there are some formatting opts that can achieve the same thing)
Beta Was this translation helpful? Give feedback.
All reactions