-
-
Notifications
You must be signed in to change notification settings - Fork 16
chore: Let rustfmt format code in doc comments #1125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e4340c1 to
282a975
Compare
rustfmt added trailing whitespaces, which collided with the trailing-whitespace check
|
Well we have a problem... rustfmt adds trailing whitespaces (which arguably isn't great). |
They were there on purpose. Too bad we have to remove them to avoid these weird spaces being inserted... |
|
I looked through the diff again. Yes, the removed empty lines aren't great, but in my opinion the benefits of the formatted code snippets by far outweigh that. |
|
Yes, I agree. I just hope this feature improves in the future or there will be more granular control over this. |
|
Merging to get this in (and potentially cut a release). #1130 will fix the pre-commit |
Enable
format_code_in_doc_commentsand letcargo +nightly-2025-10-23 fmt --allformat the code.The unstable feature isn't perfect, but in my opinion this is a significant improvement.