coverage: Reserve capacity for all of a function's mapping regions
We already know in advance how many entries will be pushed onto this vector.
This commit is contained in:
parent
4f88aa0fbd
commit
fbbb543ced
@ -171,7 +171,7 @@ fn write_coverage_mapping<'a>(
|
||||
}
|
||||
|
||||
let mut virtual_file_mapping = Vec::new();
|
||||
let mut mapping_regions = Vec::new();
|
||||
let mut mapping_regions = Vec::with_capacity(counter_regions.len());
|
||||
let mut current_file_name = None;
|
||||
let mut current_file_id = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user