diff options
Diffstat (limited to 'cli/lsp/performance.rs')
-rw-r--r-- | cli/lsp/performance.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/lsp/performance.rs b/cli/lsp/performance.rs index 72bec20ab..717ae792d 100644 --- a/cli/lsp/performance.rs +++ b/cli/lsp/performance.rs @@ -121,10 +121,11 @@ impl Performance { averages .into_iter() .map(|(k, d)| { - let a = d.clone().into_iter().sum::<Duration>() / d.len() as u32; + let count = d.len() as u32; + let a = d.into_iter().sum::<Duration>() / count; PerformanceAverage { name: k, - count: d.len() as u32, + count, average_duration: a.as_millis() as u32, } }) |