summaryrefslogtreecommitdiff
path: root/info.toml
diff options
context:
space:
mode:
authorFranklin van Nes <franklin.vannes@gmail.com>2021-12-15 11:46:27 -0500
committerFranklin van Nes <franklin.vannes@gmail.com>2021-12-15 11:46:27 -0500
commitf2650de369810867d2763e935ac0963c32ec420e (patch)
tree669fc68886aba09ef53341e9b5a84f0ea94f876e /info.toml
parentacaee799946c06a323634a27ceecd105c3275b14 (diff)
fix(clippy1): Updated code to test correctness clippy lint with approx_constant lint rule
closes #888
Diffstat (limited to 'info.toml')
-rw-r--r--info.toml16
1 files changed, 8 insertions, 8 deletions
diff --git a/info.toml b/info.toml
index 95850c6..0c03def 100644
--- a/info.toml
+++ b/info.toml
@@ -906,15 +906,15 @@ name = "clippy1"
path = "exercises/clippy/clippy1.rs"
mode = "clippy"
hint = """
-Not every floating point value can be represented exactly in binary values in
-memory. Take a look at the description of
-https://doc.rust-lang.org/stable/std/primitive.f32.html
-When using the binary compare operators with floating points you won't compare
-the floating point values but the binary representation in memory. This is
-usually not what you would like to do.
+Rust stores the highest precision version of any long or inifinite precision
+mathematical constants in the rust standard library.
+https://doc.rust-lang.org/stable/std/f32/consts/index.html
+
+We may be tempted to use our own approximations for certain mathematical constants,
+but clippy recognizes those imprecise mathematical constants as a source of
+potential error.
See the suggestions of the clippy warning in compile output and use the
-machine epsilon value...
-https://doc.rust-lang.org/stable/std/primitive.f32.html#associatedconstant.EPSILON"""
+appropriate replacement constant from std::f32::consts..."""
[[exercises]]
name = "clippy2"