From 09ae09301ce3d21ed8d6e9508bc3ae81d2c43b00 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 24 Oct 2022 21:42:09 -0700 Subject: [PATCH] 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` --- tests/data/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/data/lib.rs b/tests/data/lib.rs index 72b99e9..0f78fa0 100644 --- a/tests/data/lib.rs +++ b/tests/data/lib.rs @@ -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;