From 1555a1aa0d5d45e4b317db272c07ad3e8470553d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 14 Oct 2019 15:15:47 +0300 Subject: remove one more dependency on source roots --- crates/ra_batch/src/lib.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'crates/ra_batch/src') diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs index 602beb439..df49eb13d 100644 --- a/crates/ra_batch/src/lib.rs +++ b/crates/ra_batch/src/lib.rs @@ -141,14 +141,8 @@ mod tests { #[test] fn test_loading_rust_analyzer() { let path = Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap().parent().unwrap(); - let (host, roots) = load_cargo(path).unwrap(); - let mut n_crates = 0; - for (root, _) in roots { - for _krate in Crate::source_root_crates(host.raw_database(), root) { - n_crates += 1; - } - } - + let (host, _roots) = load_cargo(path).unwrap(); + let n_crates = Crate::all(host.raw_database()).len(); // RA has quite a few crates, but the exact count doesn't matter assert!(n_crates > 20); } -- cgit v1.2.3