Skip to content

Commit 7d6f157

Browse files
committed
tests: Fix warnings from clippy::approx_constant
1 parent 6c38d43 commit 7d6f157

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

server/http/tests/response.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ fn canonical_serialization() {
7171
);
7272

7373
// Value::Float
74-
assert_resp!(r#"{"data":{"float":3.14159}}"#, object! { float: 3.14159 });
74+
#[allow(clippy::approx_constant)]
75+
let almost_pi = 3.14159_f64;
76+
assert_resp!(
77+
r#"{"data":{"float":3.14159}}"#,
78+
object! { float: almost_pi }
79+
);
7580

7681
// Value::String
7782
assert_resp!(

0 commit comments

Comments
 (0)