diff options
Diffstat (limited to 'components/util/workqueue.rs')
-rw-r--r-- | components/util/workqueue.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/util/workqueue.rs b/components/util/workqueue.rs index af481312f21..26125335b3e 100644 --- a/components/util/workqueue.rs +++ b/components/util/workqueue.rs @@ -259,13 +259,13 @@ impl<QueueData: Sync, WorkData: Send> WorkQueue<QueueData, WorkData> { } // Connect workers to one another. - for i in 0..thread_count { - for j in 0..thread_count { + for (i, mut thread) in threads.iter_mut().enumerate() { + for (j, info) in infos.iter().enumerate() { if i != j { - threads[i].other_deques.push(infos[j].thief.clone()) + thread.other_deques.push(info.thief.clone()) } } - assert!(threads[i].other_deques.len() == thread_count - 1) + assert!(thread.other_deques.len() == thread_count - 1) } // Spawn threads. |