Categories
Latest version
v0.5.1
Updated on
Jan 16, 2023
Issues
203
Autofix
62
version = 1
[[analyzers]]
name = "rust"
enabled = true
[analyzers.meta]
msrv = "stable"
Anti-pattern
120
Bug risk
47
Documentation
1
Performance
12
Security
23
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
.