diff options
author | Sergey Parilin <[email protected]> | 2019-04-02 15:52:04 +0100 |
---|---|---|
committer | Sergey Parilin <[email protected]> | 2019-04-02 15:52:04 +0100 |
commit | 9b73f809596e955216dde24fcf921d6985a1a767 (patch) | |
tree | 016b82dc06800a174c49a0ba88957df9c91d1906 /crates/ra_cli | |
parent | ef02c3c038812897cd96789fa35770e4215d27e8 (diff) |
PR issuse resolved
Diffstat (limited to 'crates/ra_cli')
-rw-r--r-- | crates/ra_cli/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_cli/src/main.rs | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_cli/Cargo.toml b/crates/ra_cli/Cargo.toml index 4c666f556..a92a63257 100644 --- a/crates/ra_cli/Cargo.toml +++ b/crates/ra_cli/Cargo.toml | |||
@@ -19,3 +19,4 @@ tools = { path = "../tools" } | |||
19 | ra_batch = { path = "../ra_batch" } | 19 | ra_batch = { path = "../ra_batch" } |
20 | ra_hir = { path = "../ra_hir" } | 20 | ra_hir = { path = "../ra_hir" } |
21 | ra_db = { path = "../ra_db" } | 21 | ra_db = { path = "../ra_db" } |
22 | ra_prof = { path = "../ra_prof" } | ||
diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs index 5285f1f28..c13c7910c 100644 --- a/crates/ra_cli/src/main.rs +++ b/crates/ra_cli/src/main.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | mod analysis_stats; | 1 | mod analysis_stats; |
2 | 2 | ||
3 | use std::{fs, io::Read, path::Path, time::Instant}; | 3 | use std::{fs, io::Read, path::Path}; |
4 | 4 | ||
5 | use clap::{App, Arg, SubCommand}; | 5 | use clap::{App, Arg, SubCommand}; |
6 | use join_to_string::join; | 6 | use join_to_string::join; |
@@ -9,6 +9,7 @@ use ra_ide_api_light::file_structure; | |||
9 | use ra_syntax::{SourceFile, TextRange, TreeArc, AstNode}; | 9 | use ra_syntax::{SourceFile, TextRange, TreeArc, AstNode}; |
10 | use tools::collect_tests; | 10 | use tools::collect_tests; |
11 | use flexi_logger::Logger; | 11 | use flexi_logger::Logger; |
12 | use ra_prof::profile; | ||
12 | 13 | ||
13 | type Result<T> = ::std::result::Result<T, failure::Error>; | 14 | type Result<T> = ::std::result::Result<T, failure::Error>; |
14 | 15 | ||
@@ -34,13 +35,11 @@ fn main() -> Result<()> { | |||
34 | .get_matches(); | 35 | .get_matches(); |
35 | match matches.subcommand() { | 36 | match matches.subcommand() { |
36 | ("parse", Some(matches)) => { | 37 | ("parse", Some(matches)) => { |
37 | let start = Instant::now(); | 38 | let _p = profile("parsing"); |
38 | let file = file()?; | 39 | let file = file()?; |
39 | let elapsed = start.elapsed(); | ||
40 | if !matches.is_present("no-dump") { | 40 | if !matches.is_present("no-dump") { |
41 | println!("{}", file.syntax().debug_dump()); | 41 | println!("{}", file.syntax().debug_dump()); |
42 | } | 42 | } |
43 | eprintln!("parsing: {:?}", elapsed); | ||
44 | ::std::mem::forget(file); | 43 | ::std::mem::forget(file); |
45 | } | 44 | } |
46 | ("symbols", _) => { | 45 | ("symbols", _) => { |