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
I'm working on creating some sample code that is heavily commented (as a teaching tool) and rustfmt was unhappy with trailing whitespace when I was using // on a line by itself to break up long blocks of text. the output showed
// Payload: The response from the function, or an error object.
- //
+ //
// For our example, we are just going to interact with the payload
// portion of the response
Ok(resp) => {
Which is rather confusing until you copy/paste the response and examine that one contains a space and the other doesn't. Would it be possible for rustfmt to identify this whitespace in some way? maybe like with the little dots that some IDEs use?
The text was updated successfully, but these errors were encountered:
Thanks for reaching out! I'd be open to anything that provides more visual cues in these cases, but to be fully transparent doing so is a very low priority. Part of the challenge is that highlighting spacing can produce some very noisy/difficult to process diffs when you consider the entire realm of formatting changes beyond the simple trailing whitespace trim case shared in the description
There's a lot of other considerations that would fall under this bucket as well, such as conversions between tab and space characters, newline styles, etc.
Understandable. I didn't see an Issue for it so I figured I'd open one to track it. I think If I had read the docs before using rustfmt I probably wouldn't have been caught up by this.
I'm working on creating some sample code that is heavily commented (as a teaching tool) and
rustfmt
was unhappy with trailing whitespace when I was using//
on a line by itself to break up long blocks of text. the output showedWhich is rather confusing until you copy/paste the response and examine that one contains a space and the other doesn't. Would it be possible for
rustfmt
to identify this whitespace in some way? maybe like with the little dots that some IDEs use?The text was updated successfully, but these errors were encountered: