Skip to content

Commit

Permalink
Resolve unnecessary_to_owned clippy lint in test suite
Browse files Browse the repository at this point in the history
    error: unnecessary use of `to_vec`
       --> test_suite/tests/test_de.rs:251:12
        |
    251 |     .chain(ignorable_tokens.to_vec().into_iter())
        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `ignorable_tokens.iter().copied()`
        |
        = note: `-D clippy::unnecessary-to-owned` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
  • Loading branch information
dtolnay committed Dec 18, 2021
1 parent 77ae1c3 commit 1eccb3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test_suite/tests/test_de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ fn assert_de_tokens_ignore(ignorable_tokens: &[Token]) {
Token::Str("ignored"),
]
.into_iter()
.chain(ignorable_tokens.to_vec().into_iter())
.chain(ignorable_tokens.iter().copied())
.chain(vec![Token::MapEnd].into_iter())
.collect();

Expand Down

0 comments on commit 1eccb3c

Please sign in to comment.