v0.13.6
Sep 26, 2024
247
71
version = 1
[[analyzers]]
name = "rust"
[analyzers.meta]
msrv = "stable"
Anti-pattern
136
Bug risk
68
Documentation
2
Performance
15
Security
26
In tuple or struct patterns, zero or more "remaining" elements can be discarded
using the rest (..
) pattern and exactly one element can be discarded using
the wildcard pattern (_
). This checker looks for wildcard patterns next to a
rest pattern. The wildcard is unnecessary because the rest pattern can match
that element as well.
fold
RS-W1022Certain forms of fold
have concise alternatives, such as sum
, product
,
any
or all
. Prefer these forms where applicable as they improve
readability.
match
statements with only one useful arm can be reduced to an if-else
statement.
This helps improve readability, an if-else
statement nests lesser than a match
.