lint identity_conversion
could be extended to work with try_from
/try_into
#5344
Labels
A-documentation
Area: Adding or improving documentation
A-lint
Area: New lints
good-first-issue
These issues are a good way to get started with Clippy
L-complexity
Lint: Belongs in the complexity lint group
The following code doesn't warn about the useless conversion from
u8
tou8
:Playground link
The identity_conversion lint currently only supports the traits
Into
,From
, andFromIter
. I think it should be simple and useful to extend it to also work withTryFrom
andTryInto
.An alternative would be a new lint to warn on usages of
try_from
whenfrom
is enough, but I'm not sure how can that be implemented.The text was updated successfully, but these errors were encountered: