From 805fef0301a5a60f3f3c445a5f0637365412ecb5 Mon Sep 17 00:00:00 2001 From: msizanoen1 Date: Sun, 10 Nov 2019 10:54:49 +0700 Subject: [PATCH] Only pass rlibs in target deps directory --- tests/compile-test.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/compile-test.rs b/tests/compile-test.rs index 2dd88f3ba5ef..9c34d490b539 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -62,14 +62,8 @@ fn config(mode: &str, dir: PathBuf) -> compiletest::Config { // See https://github.com/rust-lang/rust-clippy/issues/4015. let needs_disambiguation = ["serde", "regex", "clippy_lints"]; // This assumes that deps are compiled (they are for Cargo integration tests). - let deps = fs::read_dir(host_libs().join("deps")).unwrap(); - let deps: Vec<_> = if let Some(target_libs) = target_libs() { - deps.chain(fs::read_dir(target_libs.join("deps")).unwrap()).collect() - } else { - deps.collect() - }; + let deps = fs::read_dir(target_libs().unwrap_or_else(host_libs).join("deps")).unwrap(); let disambiguated = deps - .into_iter() .filter_map(|dep| { let path = dep.ok()?.path(); let name = path.file_name()?.to_string_lossy();