From 6964a88e8c90f06220498d3e9194b7e2073c1e32 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 9 Feb 2019 18:27:11 +0100 Subject: Add an ra_cli command that analyses all crates in the current workspace ... and prints various stats about how many expressions have a type etc. --- crates/ra_batch/src/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'crates/ra_batch') diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs index ea91d88b7..014663546 100644 --- a/crates/ra_batch/src/lib.rs +++ b/crates/ra_batch/src/lib.rs @@ -60,7 +60,11 @@ impl BatchDatabase { match change { VfsChange::AddRoot { root, files } => { let source_root_id = vfs_root_to_id(root); - log::debug!("loaded source root {:?} with path {:?}", source_root_id, vfs.root2path(root)); + log::debug!( + "loaded source root {:?} with path {:?}", + source_root_id, + vfs.root2path(root) + ); let mut file_map = FxHashMap::default(); for (vfs_file, path, text) in files { let file_id = vfs_file_to_id(vfs_file); @@ -111,7 +115,8 @@ impl BatchDatabase { let crate_graph = ws.to_crate_graph(&mut load); log::debug!("crate graph: {:?}", crate_graph); - let local_roots = roots.into_iter() + let local_roots = roots + .into_iter() .filter(|r| vfs.root2path(*r).starts_with(&root)) .map(vfs_root_to_id) .collect(); -- cgit v1.2.3