aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cli
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-09-12 09:14:46 +0100
committerGitHub <[email protected]>2019-09-12 09:14:46 +0100
commit7828f43303ea03810cd5cfe47297a8d95b6ceb51 (patch)
tree0d43b7305d9b04b8ab520fca0b555f1b8d217ecb /crates/ra_cli
parent6ce6744e18f25ebcde387178125d820686692df5 (diff)
parent81e216a079a94aa598ac5cce3c21ca663a651195 (diff)
Merge #1824
1824: analysis stats uses positional arg again r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
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,