aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cli/src/analysis_stats.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_cli/src/analysis_stats.rs')
-rw-r--r--crates/ra_cli/src/analysis_stats.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs
index cda5cafb8..04aba3743 100644
--- a/crates/ra_cli/src/analysis_stats.rs
+++ b/crates/ra_cli/src/analysis_stats.rs
@@ -13,6 +13,7 @@ pub fn run(
13 memory_usage: bool, 13 memory_usage: bool,
14 path: &Path, 14 path: &Path,
15 only: Option<&str>, 15 only: Option<&str>,
16 with_deps: bool,
16) -> Result<()> { 17) -> Result<()> {
17 let db_load_time = Instant::now(); 18 let db_load_time = Instant::now();
18 let (mut host, roots) = ra_batch::load_cargo(path)?; 19 let (mut host, roots) = ra_batch::load_cargo(path)?;
@@ -23,18 +24,17 @@ pub fn run(
23 let mut visited_modules = HashSet::new(); 24 let mut visited_modules = HashSet::new();
24 let mut visit_queue = Vec::new(); 25 let mut visit_queue = Vec::new();
25 26
26 let members = roots 27 let members =
27 .into_iter() 28 roots
28 .filter_map( 29 .into_iter()
29 |(source_root_id, project_root)| { 30 .filter_map(|(source_root_id, project_root)| {
30 if project_root.is_member() { 31 if with_deps || project_root.is_member() {
31 Some(source_root_id) 32 Some(source_root_id)
32 } else { 33 } else {
33 None 34 None
34 } 35 }
35 }, 36 })
36 ) 37 .collect::<HashSet<_>>();
37 .collect::<HashSet<_>>();
38 38
39 for krate in Crate::all(db) { 39 for krate in Crate::all(db) {
40 let module = krate.root_module(db).expect("crate without root module"); 40 let module = krate.root_module(db).expect("crate without root module");