Skip to content

Commit f2c74e2

Browse files
committed
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
2 parents 0c9016a + cfccdbb commit f2c74e2

File tree

1 file changed

+2
-2
lines changed
  • clippy_lints/src/operators

1 file changed

+2
-2
lines changed

clippy_lints/src/operators/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ declare_clippy_lint! {
641641

642642
declare_clippy_lint! {
643643
/// ### What it does
644-
/// Checks for getting the remainder of a division by one or minus
644+
/// Checks for getting the remainder of integer division by one or minus
645645
/// one.
646646
///
647647
/// ### Why is this bad?
@@ -660,7 +660,7 @@ declare_clippy_lint! {
660660
#[clippy::version = "pre 1.29.0"]
661661
pub MODULO_ONE,
662662
correctness,
663-
"taking a number modulo +/-1, which can either panic/overflow or always returns 0"
663+
"taking an integer modulo +/-1, which can either panic/overflow or always returns 0"
664664
}
665665

666666
declare_clippy_lint! {

0 commit comments

Comments
 (0)