diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs index 04aba374371..3429a3c49fd 100644 --- a/crates/ra_cli/src/analysis_stats.rs +++ b/crates/ra_cli/src/analysis_stats.rs @@ -169,12 +169,12 @@ pub fn run( println!( "Expressions of unknown type: {} ({}%)", num_exprs_unknown, - (num_exprs_unknown * 100 / num_exprs) + if num_exprs > 0 { (num_exprs_unknown * 100 / num_exprs) } else { 100 } ); println!( "Expressions of partially unknown type: {} ({}%)", num_exprs_partially_unknown, - (num_exprs_partially_unknown * 100 / num_exprs) + if num_exprs > 0 { (num_exprs_partially_unknown * 100 / num_exprs) } else { 100 } ); println!("Type mismatches: {}", num_type_mismatches); println!("Inference: {:?}, {}", inference_time.elapsed(), ra_prof::memory_usage());