stop clone

This commit is contained in:
Quaternions 2024-02-13 00:07:14 -08:00
parent 3bad427f61
commit 69bab269db

View File

@ -154,7 +154,7 @@ impl GraphicsState{
let num_textures=indexed_models.textures.len(); let num_textures=indexed_models.textures.len();
for (i,texture_id) in indexed_models.textures.into_iter().enumerate(){ for (i,texture_id) in indexed_models.textures.into_iter().enumerate(){
let path=std::path::PathBuf::from(format!("textures/{}.dds",texture_id)); 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); double_map.insert(i as u32, texture_loading_threads.len() as u32);
texture_loading_threads.push((texture_id,std::thread::spawn(move ||{ texture_loading_threads.push((texture_id,std::thread::spawn(move ||{
ddsfile::Dds::read(&mut file).unwrap() ddsfile::Dds::read(&mut file).unwrap()