mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
analysis stats uses positional arg again
This commit is contained in:
parent
6ce6744e18
commit
81e216a079
1 changed files with 8 additions and 2 deletions
|
@ -69,9 +69,15 @@ fn main() -> Result<()> {
|
|||
}
|
||||
let verbose = matches.contains(["-v", "--verbose"]);
|
||||
let memory_usage = matches.contains("--memory-usage");
|
||||
let path: String = matches.value_from_str("--path")?.unwrap_or_default();
|
||||
let only = matches.value_from_str(["-o", "--only"])?.map(|v: String| v.to_owned());
|
||||
matches.finish().or_else(handle_extra_flags)?;
|
||||
let path = {
|
||||
let mut trailing = matches.free()?;
|
||||
if trailing.len() != 1 {
|
||||
eprintln!("{}", help::ANALYSIS_STATS_HELP);
|
||||
Err("Invalid flags")?;
|
||||
}
|
||||
trailing.pop().unwrap()
|
||||
};
|
||||
analysis_stats::run(
|
||||
verbose,
|
||||
memory_usage,
|
||||
|
|
Loading…
Reference in a new issue