Skip to content

Commit ce53b86

Browse files
committed
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`
1 parent 4ea38c4 commit ce53b86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/regression/issue1004.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#[test]
44
fn test() {
55
let float = 5.55f32;
6-
let value = serde_json::to_value(&float).unwrap();
6+
let value = serde_json::to_value(float).unwrap();
77
let json = serde_json::to_string(&value).unwrap();
88

99
// If the f32 were cast to f64 by Value before serialization, then this

0 commit comments

Comments
 (0)