Recommend const functions instead of static variables #2288
Labels
A-lint
Area: New lints
good-first-issue
These issues are a good way to get started with Clippy
L-style
Lint: Belongs in the style lint group
T-middle
Type: Probably requires verifiying types
Now that const fn invocation is stabilised for the standard library at least, it makes sense to suggest replacing static variables with their const equivalents, namely:
ATOMIC_X_INIT => AtomicX::new(0)
ONCE_INIT => Once::new()
uX/iX::MAX/MIN => uX/iX::max/min_value()
The text was updated successfully, but these errors were encountered: