aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_batch
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-02-17 18:05:33 +0000
committerAleksey Kladov <[email protected]>2019-02-17 18:05:33 +0000
commitbb393e2d11fde1307e92789669ca7230457d86cd (patch)
tree7c9484d9fe9201e954b62eacfb7b25c5d9c75959 /crates/ra_batch
parent143e5b628ef7d6cf9bba8f572df7b4e7ce22dc60 (diff)
fix-tests
Diffstat (limited to 'crates/ra_batch')
-rw-r--r--crates/ra_batch/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
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 {
75 let source_root = SourceRoot { files: file_map }; 75 let source_root = SourceRoot { files: file_map };
76 db.set_source_root(source_root_id, Arc::new(source_root)); 76 db.set_source_root(source_root_id, Arc::new(source_root));
77 roots_loaded.insert(source_root_id); 77 roots_loaded.insert(source_root_id);
78 if roots_loaded.len() == vfs.num_roots() { 78 if roots_loaded.len() == vfs.n_roots() {
79 done = true; 79 done = true;
80 } 80 }
81 } 81 }
@@ -137,14 +137,14 @@ mod tests {
137 path = path.parent().unwrap().to_owned(); 137 path = path.parent().unwrap().to_owned();
138 } 138 }
139 let (db, roots) = BatchDatabase::load_cargo(path).unwrap(); 139 let (db, roots) = BatchDatabase::load_cargo(path).unwrap();
140 let mut num_crates = 0; 140 let mut n_crates = 0;
141 for root in roots { 141 for root in roots {
142 for _krate in Crate::source_root_crates(&db, root) { 142 for _krate in Crate::source_root_crates(&db, root) {
143 num_crates += 1; 143 n_crates += 1;
144 } 144 }
145 } 145 }
146 146
147 // RA has quite a few crates, but the exact count doesn't matter 147 // RA has quite a few crates, but the exact count doesn't matter
148 assert!(num_crates > 20); 148 assert!(n_crates > 20);
149 } 149 }
150} 150}