Skip to content

Commit

Permalink
Ignore redundant_clone lint on test testing clone
Browse files Browse the repository at this point in the history
    error: redundant clone
      --> tests/test_chain.rs:61:30
       |
    61 |     let mut chain = e.chain().clone();
       |                              ^^^^^^^^ help: remove this
       |
    note: this value is dropped without further use
      --> tests/test_chain.rs:61:21
       |
    61 |     let mut chain = e.chain().clone();
       |                     ^^^^^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
       = note: `-D clippy::redundant-clone` implied by `-D clippy::all`
  • Loading branch information
dtolnay committed Dec 30, 2022
1 parent 867763b commit ed1327f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ fn test_default() {
}

#[test]
#[allow(clippy::redundant_clone)]
fn test_clone() {
let e = error();
let mut chain = e.chain().clone();
Expand Down

0 comments on commit ed1327f

Please sign in to comment.