diff --git a/src/main.rs b/src/main.rs index ea2c3e90..090908d3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -506,7 +506,7 @@ impl strafe_client::framework::Example for Skybox { }); //drain the modeldata vec so entities can be /moved/ to models.entities - let mut models = Vec::::new(); + let mut models = Vec::::with_capacity(modeldatas.len()); for (i,modeldata) in modeldatas.drain(..).enumerate() { let model_uniforms = get_transform_uniform_data(&modeldata.transform); let model_buf = device.create_buffer_init(&wgpu::util::BufferInitDescriptor {