diff options
author | Seivan Heidari <[email protected]> | 2019-11-18 01:27:53 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-11-18 01:27:53 +0000 |
commit | 166636ba77adcf5bf2c4ef935e9aa75e20f25e10 (patch) | |
tree | 168be1ca55c73b016e20586c08417c608450c92c /crates/ra_cli | |
parent | cb26df950699586b314731fb70786e0db8eaa049 (diff) | |
parent | 28c2d74b2150102a8756a5357a5a965d7610bd15 (diff) |
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
Diffstat (limited to 'crates/ra_cli')
-rw-r--r-- | crates/ra_cli/src/analysis_stats.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs index 04aba3743..3429a3c49 100644 --- a/crates/ra_cli/src/analysis_stats.rs +++ b/crates/ra_cli/src/analysis_stats.rs | |||
@@ -169,12 +169,12 @@ pub fn run( | |||
169 | println!( | 169 | println!( |
170 | "Expressions of unknown type: {} ({}%)", | 170 | "Expressions of unknown type: {} ({}%)", |
171 | num_exprs_unknown, | 171 | num_exprs_unknown, |
172 | (num_exprs_unknown * 100 / num_exprs) | 172 | if num_exprs > 0 { (num_exprs_unknown * 100 / num_exprs) } else { 100 } |
173 | ); | 173 | ); |
174 | println!( | 174 | println!( |
175 | "Expressions of partially unknown type: {} ({}%)", | 175 | "Expressions of partially unknown type: {} ({}%)", |
176 | num_exprs_partially_unknown, | 176 | num_exprs_partially_unknown, |
177 | (num_exprs_partially_unknown * 100 / num_exprs) | 177 | if num_exprs > 0 { (num_exprs_partially_unknown * 100 / num_exprs) } else { 100 } |
178 | ); | 178 | ); |
179 | println!("Type mismatches: {}", num_type_mismatches); | 179 | println!("Type mismatches: {}", num_type_mismatches); |
180 | println!("Inference: {:?}, {}", inference_time.elapsed(), ra_prof::memory_usage()); | 180 | println!("Inference: {:?}, {}", inference_time.elapsed(), ra_prof::memory_usage()); |