diff options
author | Aleksey Kladov <[email protected]> | 2018-07-31 20:14:56 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-07-31 20:14:56 +0100 |
commit | 8105c14454f8c4f575f16b44ec616ffd045be57f (patch) | |
tree | d8d2aba889583afa2e6045f024656918b5f273db /cli/src/main.rs | |
parent | 5d8cef4c0eec3718d92560337f9a1d4fcf04d01f (diff) |
Improve debug_dump performance
Diffstat (limited to 'cli/src/main.rs')
-rw-r--r-- | cli/src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/main.rs b/cli/src/main.rs index ad7119533..707fbd94c 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs | |||
@@ -33,9 +33,7 @@ fn main() -> Result<()> { | |||
33 | .get_matches(); | 33 | .get_matches(); |
34 | match matches.subcommand() { | 34 | match matches.subcommand() { |
35 | ("parse", _) => { | 35 | ("parse", _) => { |
36 | let start = Instant::now(); | ||
37 | let tree = parse()?; | 36 | let tree = parse()?; |
38 | eprintln!("elapsed {:?}", start.elapsed()); | ||
39 | println!("{}", tree); | 37 | println!("{}", tree); |
40 | } | 38 | } |
41 | ("render-test", Some(matches)) => { | 39 | ("render-test", Some(matches)) => { |
@@ -53,7 +51,9 @@ fn main() -> Result<()> { | |||
53 | 51 | ||
54 | fn parse() -> Result<String> { | 52 | fn parse() -> Result<String> { |
55 | let text = read_stdin()?; | 53 | let text = read_stdin()?; |
54 | let start = Instant::now(); | ||
56 | let file = libsyntax2::parse(text); | 55 | let file = libsyntax2::parse(text); |
56 | eprintln!("elapsed {:?}", start.elapsed()); | ||
57 | let tree = libsyntax2::utils::dump_tree(&file); | 57 | let tree = libsyntax2::utils::dump_tree(&file); |
58 | Ok(tree) | 58 | Ok(tree) |
59 | } | 59 | } |