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:
commit
f2c74e220b
1 changed files with 2 additions and 2 deletions
|
@ -641,7 +641,7 @@ declare_clippy_lint! {
|
||||||
|
|
||||||
declare_clippy_lint! {
|
declare_clippy_lint! {
|
||||||
/// ### What it does
|
/// ### 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.
|
/// one.
|
||||||
///
|
///
|
||||||
/// ### Why is this bad?
|
/// ### Why is this bad?
|
||||||
|
@ -660,7 +660,7 @@ declare_clippy_lint! {
|
||||||
#[clippy::version = "pre 1.29.0"]
|
#[clippy::version = "pre 1.29.0"]
|
||||||
pub MODULO_ONE,
|
pub MODULO_ONE,
|
||||||
correctness,
|
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! {
|
declare_clippy_lint! {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue