save 1 nanosecond

This commit is contained in:
Quaternions 2023-09-06 13:59:47 -07:00
parent 75695946a0
commit fd34fbe367

View File

@ -506,7 +506,7 @@ impl strafe_client::framework::Example for Skybox {
}); });
//drain the modeldata vec so entities can be /moved/ to models.entities //drain the modeldata vec so entities can be /moved/ to models.entities
let mut models = Vec::<Model>::new(); let mut models = Vec::<Model>::with_capacity(modeldatas.len());
for (i,modeldata) in modeldatas.drain(..).enumerate() { for (i,modeldata) in modeldatas.drain(..).enumerate() {
let model_uniforms = get_transform_uniform_data(&modeldata.transform); let model_uniforms = get_transform_uniform_data(&modeldata.transform);
let model_buf = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { let model_buf = device.create_buffer_init(&wgpu::util::BufferInitDescriptor {