diff options
author | Seivan Heidari <[email protected]> | 2019-11-28 07:19:14 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-11-28 07:19:14 +0000 |
commit | 18a0937585b836ec5ed054b9ae48e0156ab6d9ef (patch) | |
tree | 9de2c0267ddcc00df717f90034d0843d751a851b /crates/ra_cli/src/analysis_stats.rs | |
parent | a7394b44c870f585eacfeb3036a33471aff49ff8 (diff) | |
parent | 484acc8a61d599662ed63a4cbda091d38a982551 (diff) |
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
Diffstat (limited to 'crates/ra_cli/src/analysis_stats.rs')
-rw-r--r-- | crates/ra_cli/src/analysis_stats.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs index c4eb28245..9b1802a5f 100644 --- a/crates/ra_cli/src/analysis_stats.rs +++ b/crates/ra_cli/src/analysis_stats.rs | |||
@@ -6,7 +6,7 @@ use ra_db::SourceDatabaseExt; | |||
6 | use ra_hir::{AssocItem, Crate, HasSource, HirDisplay, ModuleDef, Ty, TypeWalk}; | 6 | use ra_hir::{AssocItem, Crate, HasSource, HirDisplay, ModuleDef, Ty, TypeWalk}; |
7 | use ra_syntax::AstNode; | 7 | use ra_syntax::AstNode; |
8 | 8 | ||
9 | use crate::{Result, Verbosity}; | 9 | use crate::{progress_report::ProgressReport, Result, Verbosity}; |
10 | 10 | ||
11 | pub fn run( | 11 | pub fn run( |
12 | verbosity: Verbosity, | 12 | verbosity: Verbosity, |
@@ -75,17 +75,11 @@ pub fn run( | |||
75 | println!("Item Collection: {:?}, {}", analysis_time.elapsed(), ra_prof::memory_usage()); | 75 | println!("Item Collection: {:?}, {}", analysis_time.elapsed(), ra_prof::memory_usage()); |
76 | 76 | ||
77 | let inference_time = Instant::now(); | 77 | let inference_time = Instant::now(); |
78 | let bar = match verbosity { | 78 | let mut bar = match verbosity { |
79 | Verbosity::Verbose | Verbosity::Normal => indicatif::ProgressBar::with_draw_target( | 79 | Verbosity::Verbose | Verbosity::Normal => ProgressReport::new(funcs.len() as u64), |
80 | funcs.len() as u64, | 80 | Verbosity::Quiet => ProgressReport::hidden(), |
81 | indicatif::ProgressDrawTarget::stderr_nohz(), | ||
82 | ), | ||
83 | Verbosity::Quiet => indicatif::ProgressBar::hidden(), | ||
84 | }; | 81 | }; |
85 | 82 | ||
86 | bar.set_style( | ||
87 | indicatif::ProgressStyle::default_bar().template("{wide_bar} {pos}/{len}\n{msg}"), | ||
88 | ); | ||
89 | bar.tick(); | 83 | bar.tick(); |
90 | let mut num_exprs = 0; | 84 | let mut num_exprs = 0; |
91 | let mut num_exprs_unknown = 0; | 85 | let mut num_exprs_unknown = 0; |