diff --git a/strafe-client/src/physics.rs b/strafe-client/src/physics.rs index 8a49355a..814345df 100644 --- a/strafe-client/src/physics.rs +++ b/strafe-client/src/physics.rs @@ -2265,7 +2265,7 @@ mod test{ // spawn threads println!("spawning up to {thread_limit} threads..."); let mut active_thread_count=0; - for _ in 0..thread_limit{ + while active_thread_count<thread_limit{ if let Some(dir_entry_result)=read_dir.next(){ if let Some(file_path)=get_file_path(dir_entry_result?)?{ active_thread_count+=1;