From fd34fbe36752ad866bf1c07a530c667bfa744c4f Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 6 Sep 2023 13:59:47 -0700 Subject: [PATCH] save 1 nanosecond --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index ea2c3e9..090908d 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 {