Make docs more clear (#15933)

`NB!` is extremely alien + not used anywhere else in repo (per github
search).

`Notes => Note`. At first thought was convention (written from
perspective of the lint), but not seen anywhere else in repo (per github
search).

Implication: clearer docs

Changes made from github web editor; no tests/checks performed.

changelog: none
This commit is contained in:
Samuel Tardieu 2025-10-22 08:30:46 +00:00 committed by GitHub
commit fd208399ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -464,7 +464,7 @@ declare_clippy_lint! {
declare_clippy_lint! {
/// ### What it does
/// Checks for statements of the form `(a - b) < f32::EPSILON` or
/// `(a - b) < f64::EPSILON`. Notes the missing `.abs()`.
/// `(a - b) < f64::EPSILON`. Note the missing `.abs()`.
///
/// ### Why is this bad?
/// The code without `.abs()` is more likely to have a bug.
@ -617,7 +617,7 @@ declare_clippy_lint! {
/// println!("{within_tolerance}"); // true
/// ```
///
/// NB! Do not use `f64::EPSILON` - while the error margin is often called "epsilon", this is
/// NOTE: Do not use `f64::EPSILON` - while the error margin is often called "epsilon", this is
/// a different use of the term that is not suitable for floating point equality comparison.
/// Indeed, for the example above using `f64::EPSILON` as the allowed error would return `false`.
///
@ -680,7 +680,7 @@ declare_clippy_lint! {
/// println!("{within_tolerance}"); // true
/// ```
///
/// NB! Do not use `f64::EPSILON` - while the error margin is often called "epsilon", this is
/// NOTE: Do not use `f64::EPSILON` - while the error margin is often called "epsilon", this is
/// a different use of the term that is not suitable for floating point equality comparison.
/// Indeed, for the example above using `f64::EPSILON` as the allowed error would return `false`.
///