From ce53b862b9a09130cdd5363088135b4b5c853735 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 27 Mar 2023 10:11:43 -0700 Subject: [PATCH] Fix needless_borrow clippy lint in test error: the borrowed expression implements the required traits --> tests/regression/issue1004.rs:6:38 | 6 | let value = serde_json::to_value(&float).unwrap(); | ^^^^^^ help: change this to: `float` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `-D clippy::needless-borrow` implied by `-D clippy::all` --- tests/regression/issue1004.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/regression/issue1004.rs b/tests/regression/issue1004.rs index 3f5bd96aa..c09fb9610 100644 --- a/tests/regression/issue1004.rs +++ b/tests/regression/issue1004.rs @@ -3,7 +3,7 @@ #[test] fn test() { let float = 5.55f32; - let value = serde_json::to_value(&float).unwrap(); + let value = serde_json::to_value(float).unwrap(); let json = serde_json::to_string(&value).unwrap(); // If the f32 were cast to f64 by Value before serialization, then this