We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Vec::with_capacity
next_elements
1 parent 25a0163 commit cd31cc1Copy full SHA for cd31cc1
crates/oxc_formatter/src/ir_transform/sort_imports/mod.rs
@@ -136,7 +136,7 @@ impl SortImportsTransform {
136
137
// Finally, sort import lines within each chunk.
138
// After sorting, flatten everything back to `FormatElement`s.
139
- let mut next_elements = vec![];
+ let mut next_elements = Vec::with_capacity(prev_elements.len());
140
141
let mut chunks_iter = chunks.into_iter().enumerate().peekable();
142
while let Some((idx, chunk)) = chunks_iter.next() {
0 commit comments