Skip to content

Commit

Permalink
Resolve needless_borrow pedantic 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.rs:1931:34
         |
    1931 |     assert!(serde_json::to_value(&map).is_err());
         |                                  ^^^^ help: change this to: `map`
         |
         = 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`
  • Loading branch information
dtolnay committed Oct 25, 2022
1 parent 993e7a6 commit 4f194c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1928,7 +1928,7 @@ fn test_deny_float_key() {

// map with float key
let map = treemap!(Float => "x");
assert!(serde_json::to_value(&map).is_err());
assert!(serde_json::to_value(map).is_err());
}

#[test]
Expand Down

0 comments on commit 4f194c9

Please sign in to comment.