What it does
In most cases, a trailing comma before parentheses is not needed, especially in a macro invocation. Yet, I suspect this cannot be fully automated by rustfmt because there are some edge cases which do require that comma to be present. I think there should be a lint offering to remove it.
Advantage
- Cleaner, easier to read code
Drawbacks
extremely rare edge cases might be tricky to detect
Example
Could be written as:
What it does
In most cases, a trailing comma before parentheses is not needed, especially in a macro invocation. Yet, I suspect this cannot be fully automated by
rustfmtbecause there are some edge cases which do require that comma to be present. I think there should be a lint offering to remove it.Advantage
Drawbacks
extremely rare edge cases might be tricky to detect
Example
Could be written as: