Closed
Description
What it does
Currently, Rust have three way to getting min/max of an integers:
- module constants:
std::i32::MAX
- type constants:
i32::MAX
- const methods:
i32::max_value()
(3) is soft-deprecated and replaced by 2) when possible.
T-libs doesn't want to deprecate 1) and 3) now until next Rust edition,
but we have no tools to enforce style for 2),
it is great to have such a lint in Clippy.
Categories (optional)
- Kind: style
Drawbacks
None.