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 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/data/lib.rs:36:31
       |
    36 |     for entry in fs::read_dir(&yaml_test_suite).unwrap() {
       |                               ^^^^^^^^^^^^^^^^ help: change this to: `yaml_test_suite`
       |
       = 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 447a4ca commit 09ae093
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/data/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn test(ignorelist: &str, check: fn(&Path) -> bool) -> TokenStream {

let mut ids = Map::new();
let yaml_test_suite = tests_dir.join("data").join("yaml-test-suite");
for entry in fs::read_dir(&yaml_test_suite).unwrap() {
for entry in fs::read_dir(yaml_test_suite).unwrap() {
let entry = entry.unwrap();
if !entry.file_type().unwrap().is_dir() {
continue;
Expand Down

0 comments on commit 09ae093

Please sign in to comment.