We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91968e3 commit 2c0d537Copy full SHA for 2c0d537
src/tests.rs
@@ -62,7 +62,7 @@ fn almost_equals(a: &Json, b: &Json) -> bool {
62
(_, &Json::I64(b)) => almost_equals(a, &Json::F64(b as f64)),
63
(_, &Json::U64(b)) => almost_equals(a, &Json::F64(b as f64)),
64
65
- (&Json::F64(a), &Json::F64(b)) => (a - b).abs() < 1e-6,
+ (&Json::F64(a), &Json::F64(b)) => (a - b).abs() < 1. / 255.,
66
67
(&Json::Boolean(a), &Json::Boolean(b)) => a == b,
68
(&Json::String(ref a), &Json::String(ref b)) => a == b,
0 commit comments