diff options
| author | bors <bors@rust-lang.org> | 2024-07-07 10:21:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-07 10:21:47 +0000 |
| commit | f2c74e220bef89dc62dfbd1d2a4eb49c6ae8b47a (patch) | |
| tree | ecf7ca810d19e1bc97f5104ae902d9bb0c0a971a | |
| parent | 0c9016aa1e6bd631aff4c03b86ccb17844ce71a1 (diff) | |
| parent | cfccdbb1641289e92d414b01f67c6a22b485a327 (diff) | |
| download | rust-f2c74e220bef89dc62dfbd1d2a4eb49c6ae8b47a.tar.gz rust-f2c74e220bef89dc62dfbd1d2a4eb49c6ae8b47a.zip | |
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
| -rw-r--r-- | clippy_lints/src/operators/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/operators/mod.rs b/clippy_lints/src/operators/mod.rs index 202ee61506c..1079934934c 100644 --- a/clippy_lints/src/operators/mod.rs +++ b/clippy_lints/src/operators/mod.rs @@ -641,7 +641,7 @@ declare_clippy_lint! { 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 @@ declare_clippy_lint! { #[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! { |
