From 355d391ea5bdfb7dede8a89494b0275dae57d11a Mon Sep 17 00:00:00 2001
From: Quaternions <krakow20@gmail.com>
Date: Sun, 1 Oct 2023 15:21:19 -0700
Subject: [PATCH] wee opti

---
 src/main.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 71e1d336..42993c12 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -157,10 +157,10 @@ impl GraphicsData {
 			})
 		}).collect();
 
-		let indexed_models_len=indexed_models.models.len();
 		//split groups with different textures into separate models
 		//the models received here are supposed to be tightly packed, i.e. no code needs to check if two models are using the same groups.
-		let mut unique_texture_models=Vec::with_capacity(indexed_models.models.len());
+		let indexed_models_len=indexed_models.models.len();
+		let mut unique_texture_models=Vec::with_capacity(indexed_models_len);
 		for mut model in indexed_models.models.drain(..){
 			//convert ModelInstance into ModelGraphicsInstance
 			let instances:Vec<ModelGraphicsInstance>=model.instances.iter().map(|instance|{