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.
1 parent a00a5ed commit beacabaCopy full SHA for beacaba
core/src/avm2/globals/flash/text/font.rs
@@ -133,10 +133,11 @@ pub fn enumerate_fonts<'gc>(
133
});
134
135
let font_class = activation.avm2().classes().font;
136
- let mut storage = ArrayStorage::new(fonts.len());
137
- for font in fonts {
138
- storage.push(FontObject::for_font(activation.gc(), font_class, font).into());
139
- }
+ let mut storage = fonts
+ .into_iter()
+ .map(|font| FontObject::for_font(activation.gc(), font_class, font))
+ .collect();
140
+
141
Ok(ArrayObject::from_storage(activation, storage).into())
142
}
143
0 commit comments