From 69bab269db95340867407b9b13c22a2c6899f955 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 13 Feb 2024 00:07:14 -0800 Subject: [PATCH] stop clone --- src/graphics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphics.rs b/src/graphics.rs index e83ee9e..9239b2e 100644 --- a/src/graphics.rs +++ b/src/graphics.rs @@ -154,7 +154,7 @@ impl GraphicsState{ let num_textures=indexed_models.textures.len(); for (i,texture_id) in indexed_models.textures.into_iter().enumerate(){ let path=std::path::PathBuf::from(format!("textures/{}.dds",texture_id)); - if let Ok(mut file) = std::fs::File::open(path.clone()){ + if let Ok(mut file)=std::fs::File::open(path.as_path()){ double_map.insert(i as u32, texture_loading_threads.len() as u32); texture_loading_threads.push((texture_id,std::thread::spawn(move ||{ ddsfile::Dds::read(&mut file).unwrap()