From bb393e2d11fde1307e92789669ca7230457d86cd Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 17 Feb 2019 21:05:33 +0300 Subject: fix-tests --- crates/ra_batch/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_batch/src') diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs index 69d66113e..89a234f4c 100644 --- a/crates/ra_batch/src/lib.rs +++ b/crates/ra_batch/src/lib.rs @@ -75,7 +75,7 @@ impl BatchDatabase { let source_root = SourceRoot { files: file_map }; db.set_source_root(source_root_id, Arc::new(source_root)); roots_loaded.insert(source_root_id); - if roots_loaded.len() == vfs.num_roots() { + if roots_loaded.len() == vfs.n_roots() { done = true; } } @@ -137,14 +137,14 @@ mod tests { path = path.parent().unwrap().to_owned(); } let (db, roots) = BatchDatabase::load_cargo(path).unwrap(); - let mut num_crates = 0; + let mut n_crates = 0; for root in roots { for _krate in Crate::source_root_crates(&db, root) { - num_crates += 1; + n_crates += 1; } } // RA has quite a few crates, but the exact count doesn't matter - assert!(num_crates > 20); + assert!(n_crates > 20); } } -- cgit v1.2.3