Auto merge of #12966 - Rudxain:patch-1, r=dswij

Clarify that `modulo_one` only applies to ints

changelog: [`modulo_one`]: (docs) Clarify that it only applies to integers

This might be nitpicky, but it's more technically correct.

It also helps if a user skims through the docs, because they may believe it also applies to `{float}`s. This doc edit minimizes that possibility
This commit is contained in:
bors
2024-07-07 10:21:47 +00:00
+2 -2
View File
@@ -641,7 +641,7 @@
declare_clippy_lint! {
/// ### What it does
/// Checks for getting the remainder of a division by one or minus
/// Checks for getting the remainder of integer division by one or minus
/// one.
///
/// ### Why is this bad?
@@ -660,7 +660,7 @@
#[clippy::version = "pre 1.29.0"]
pub MODULO_ONE,
correctness,
"taking a number modulo +/-1, which can either panic/overflow or always returns 0"
"taking an integer modulo +/-1, which can either panic/overflow or always returns 0"
}
declare_clippy_lint! {