sqlx/clippy.toml
Austin Bonander 1a9e0d9a52 ban Ord::{min, max} with Clippy as it's too easy to misread
It is *much* too easy to misread `x.min(y)` as "`x` should be *at least* `y`" when in fact it means the *exact* opposite, and same with `x.max(y)`. This has bitten us in the gluteus maximus a number of times both in SQLx and in private projects.

Signed-off-by: Austin Bonander <austin@launchbadge.com>
2021-02-05 13:30:35 -08:00

5 lines
261 B
TOML

disallowed-methods = [
# It is *much* too easy to misread `x.min(y)` as "x should be *at least* y" when in fact it
# means the *exact* opposite, and same with `x.max(y)`; use `cmp::{min, max}` instead.
"core::cmp::Ord::min", "core::cmp::Ord::max"
]