mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
use a with_capacity while allocating the progress view
This commit is contained in:
parent
ab9213fa94
commit
75d5cea624
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ impl Progress {
|
|||
let mut percentage = 0.0;
|
||||
let mut prev_factors = 1.0;
|
||||
|
||||
let mut step_view = Vec::new();
|
||||
let mut step_view = Vec::with_capacity(steps.len());
|
||||
for (_, step) in steps.iter() {
|
||||
prev_factors *= step.total() as f32;
|
||||
percentage += step.current() as f32 / prev_factors;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue