Lint assert!
without message
#6207
Labels
A-lint
Area: New lints
good-first-issue
These issues are a good way to get started with Clippy
L-restriction
Lint: Belongs in the restriction lint group
T-macros
Type: Issues with macros and macro expansion
What it does
Lint
{debug_}assert{_eq,_ne}!
without a custom panic message. (inspired by this tweet)Categories (optional)
What is the advantage of the recommended code over the original code
If the assertion fails, it might be easier to diagnose why.
Drawbacks
None.
Example
Could be written as:
The text was updated successfully, but these errors were encountered: