mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
initialize vector to required size.
This commit is contained in:
parent
5df6259996
commit
160a7b097a
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ pub(crate) fn annotations(
|
|||
}
|
||||
|
||||
if config.annotate_enum_variant_references {
|
||||
let mut enum_variants_metadata: Vec<(TextRange, TextSize)> = Vec::new();
|
||||
let mut enum_variants_metadata: Vec<(TextRange, TextSize)> = Vec::with_capacity(ranges_enum_variants.len());
|
||||
for range_enum_variant in ranges_enum_variants.into_iter() {
|
||||
let (range, offset) = match range_enum_variant {
|
||||
Some(range) => (range, range.start()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue