Fix issues found by rust-clippy

This commit is contained in:
Corey Farwell 2015-10-12 19:40:48 -04:00
parent 6303126e0c
commit 20beaf5af3
23 changed files with 106 additions and 121 deletions

View file

@ -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.