aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/workqueue.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/util/workqueue.rs')
-rw-r--r--components/util/workqueue.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/util/workqueue.rs b/components/util/workqueue.rs
index a4c80359a9b..2727f036c7e 100644
--- a/components/util/workqueue.rs
+++ b/components/util/workqueue.rs
@@ -305,7 +305,7 @@ impl<QueueData: Sync, WorkData: Send> WorkQueue<QueueData, WorkData> {
pub fn run(&mut self, data: &QueueData) {
// Tell the workers to start.
let mut work_count = AtomicUsize::new(self.work_count);
- for worker in self.workers.iter_mut() {
+ for worker in &mut self.workers {
worker.chan.send(WorkerMsg::Start(worker.deque.take().unwrap(),
&mut work_count,
data)).unwrap()
@@ -316,7 +316,7 @@ impl<QueueData: Sync, WorkData: Send> WorkQueue<QueueData, WorkData> {
self.work_count = 0;
// Tell everyone to stop.
- for worker in self.workers.iter() {
+ for worker in &self.workers {
worker.chan.send(WorkerMsg::Stop).unwrap()
}
@@ -333,7 +333,7 @@ impl<QueueData: Sync, WorkData: Send> WorkQueue<QueueData, WorkData> {
/// Synchronously measure memory usage of any thread-local storage.
pub fn heap_size_of_tls(&self, f: fn() -> usize) -> Vec<usize> {
// Tell the workers to measure themselves.
- for worker in self.workers.iter() {
+ for worker in &self.workers {
worker.chan.send(WorkerMsg::HeapSizeOfTLS(f)).unwrap()
}
@@ -351,7 +351,7 @@ impl<QueueData: Sync, WorkData: Send> WorkQueue<QueueData, WorkData> {
}
pub fn shutdown(&mut self) {
- for worker in self.workers.iter() {
+ for worker in &self.workers {
worker.chan.send(WorkerMsg::Exit).unwrap()
}
}