Resolve needless_borrow pedantic clippy lint in test

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`
This commit is contained in:
David Tolnay 2022-10-24 21:42:09 -07:00
parent 447a4caa09
commit 09ae09301c
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -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;