aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cli
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_cli')
-rw-r--r--crates/ra_cli/src/main.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs
index e6334cf56..23bb83ff1 100644
--- a/crates/ra_cli/src/main.rs
+++ b/crates/ra_cli/src/main.rs
@@ -69,9 +69,15 @@ fn main() -> Result<()> {
69 } 69 }
70 let verbose = matches.contains(["-v", "--verbose"]); 70 let verbose = matches.contains(["-v", "--verbose"]);
71 let memory_usage = matches.contains("--memory-usage"); 71 let memory_usage = matches.contains("--memory-usage");
72 let path: String = matches.value_from_str("--path")?.unwrap_or_default();
73 let only = matches.value_from_str(["-o", "--only"])?.map(|v: String| v.to_owned()); 72 let only = matches.value_from_str(["-o", "--only"])?.map(|v: String| v.to_owned());
74 matches.finish().or_else(handle_extra_flags)?; 73 let path = {
74 let mut trailing = matches.free()?;
75 if trailing.len() != 1 {
76 eprintln!("{}", help::ANALYSIS_STATS_HELP);
77 Err("Invalid flags")?;
78 }
79 trailing.pop().unwrap()
80 };
75 analysis_stats::run( 81 analysis_stats::run(
76 verbose, 82 verbose,
77 memory_usage, 83 memory_usage,