Rustfmt: type_punctuation_density for indices only (inside brackets)

1

Hi, I'm wondering if I can configure rustfmt to remove the spaces around the plus operator within the square brackets only. So, indices would be Compressed whereas the rest would be Wide.

The figure above indicates where the spaces shouldn't be added.

Cheers.

EDIT:

The figure below shows before the option (if available):

2

The figure below shows after the option (if available):

3

I reckon the line # 6 with r = uu[i+1] - uu[i] - h * f(tt[i+1], uu[i+1]); might be easier to read (?)

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.