We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 961adc9 commit 882f85bCopy full SHA for 882f85b
clippy_lints/src/methods/mod.rs
@@ -3964,11 +3964,15 @@ declare_clippy_lint! {
3964
3965
declare_clippy_lint! {
3966
/// ### What it does
3967
- /// Checks for unnecessary calls to `min()` or `max()`
+ /// Checks for unnecessary calls to `min()` or `max()` in the following cases
3968
+ /// - Either both side is constant
3969
+ /// - One side is clearly larger than the other, like i32::MIN and an i32 variable
3970
///
3971
/// ### Why is this bad?
3972
- /// In these cases it is not necessary to call `min()`
3973
+ /// In the aformentioned cases it is not necessary to call `min()` or `max()`
3974
+ /// to compare values, it may even cause confusion.
3975
+ ///
3976
/// ### Example
3977
/// ```no_run
3978
/// let _ = 0.min(7_u32);
0 commit comments