Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Resolve needless_borrow clippy lint in test
Browse files Browse the repository at this point in the history
    error: the borrowed expression implements the required traits
      --> tests/test_serde.rs:22:38
       |
    22 |     let value = serde_yaml::to_value(&thing).unwrap();
       |                                      ^^^^^^ help: change this to: `thing`
       |
       = note: `-D clippy::needless-borrow` implied by `-D clippy::all`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
  • Loading branch information
dtolnay committed Sep 2, 2022
1 parent 653e0bb commit 638b1c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_serde.rs
Expand Up @@ -19,7 +19,7 @@ where
let serialized = serde_yaml::to_string(&thing).unwrap();
assert_eq!(yaml, serialized);

let value = serde_yaml::to_value(&thing).unwrap();
let value = serde_yaml::to_value(thing).unwrap();
let serialized = serde_yaml::to_string(&value).unwrap();
assert_eq!(yaml, serialized);

Expand Down

0 comments on commit 638b1c0

Please sign in to comment.