We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Boshen
Dunqing
camc314
leaysgur
Learn more about funding links in repositories.
Report abuse
1 parent e472ced commit 7be018cCopy full SHA for 7be018c
crates/oxc_mangler/src/lib.rs
@@ -179,10 +179,8 @@ impl Mangler {
179
let allocator = Allocator::default();
180
181
// All symbols with their assigned slots. Keyed by symbol id.
182
- let mut slots: Vec<'_, Slot> = Vec::with_capacity_in(symbol_table.len(), &allocator);
183
- for _ in 0..symbol_table.len() {
184
- slots.push(0);
185
- }
+ let mut slots: Vec<'_, Slot> =
+ Vec::from_iter_in(iter::repeat_n(0, symbol_table.len()), &allocator);
186
187
// Stores the lived scope ids for each slot. Keyed by slot number.
188
let mut slot_liveness: std::vec::Vec<FixedBitSet> = vec![];
0 commit comments